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

using CommunityServer.Blogs.Components;

namespace CommunityServer.Components.SearchBarrel
{
    public class WeblogBarrelItem : BarrelItem
    {
        public override void Format(IndexPost post)
        {
            WeblogPost wp = new WeblogPost();
            wp.PostID = post.PostID;
            wp.Name = post.Name;
            wp.UserTime = post.PostDate;
            wp.SectionID = post.SectionID;

            //need to figure out PostType
            post.Url = BlogUrls.Instance().Post(wp);
            post.ApplicationUrl = BlogUrls.Instance().Home;
        }

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

    }
}