//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using CommunityServer.Components.SearchBarrel;
using CommunityServer.Components;
using CommunityServer.Files.Components;
using CommunityServer.Files;

namespace CommunityServer.Components.SearchBarrel
{
	public class FileBarrelItem : BarrelItem
	{
		public override void Format(IndexPost post)
		{
			Folder f = Folders.GetFolder(post.SectionID, true);
			if (f != null)
			{
				post.Url = FileGalleryUrls.Instance().ViewEntry(f.ApplicationKey, post.PostID);
				post.ApplicationUrl = FileGalleryUrls.Instance().Home;
			}				
		}

		public override ApplicationType ApplicationType
		{
			get
			{
				return ApplicationType.FileGallery;
			}
		}

	}
}