using System; using System.Configuration; using System.Configuration.Provider; using System.Collections.Generic; using Yavsc.Model.Circles; using System.Web.Mvc; namespace Yavsc.Model.Blogs { /// /// Blog provider. /// public abstract class BlogProvider: ProviderBase { /// /// Gets the post. /// /// The post. /// Postid. public abstract BlogEntry GetPost (long postid); /// /// Gets the post collection from a given user and at a given title. /// /// The post. /// Username. /// Title. public abstract UUTBlogEntryCollection GetPost (string username, string title); /// /// Saves a post from the given username, /// at the specified title, this content, /// visible or not, and for allowedCircles. /// /// Username. /// Title. /// Content. /// If set to true visible. /// Allowed circles. public abstract long Post (string username, string title, string content, bool visible, long[] allowedCircles); /// /// Note the specified postid and note. /// /// Postid. /// rate. public abstract void Rate (long postid, int rate); /// /// Updates the post specified by its id, /// using the given title, content, visibility and circle collection. /// /// Postid. /// Title. /// Content. /// If set to true visible. /// Allowed circles. public abstract void UpdatePost (long postid, string title, string content, bool visible, long[] allowedCircles); /// /// Updates the post. /// /// Be. public abstract void UpdatePost ( BlogEntry be ); /// /// Finds a post. /// /// The post. /// Readers name. /// Pattern. /// Searchflags. /// Page index. /// Page size. /// Total records. public abstract BlogEntryCollection FindPost (string readersName, string pattern, FindBlogEntryFlags searchflags, int pageIndex, int pageSize, out int totalRecords); /// /// Removes the posts under the specified title and user. /// /// Username. /// Title. public abstract void RemoveTitle (string username, string title); /// /// Removes the post. /// /// Postid. public abstract void RemovePost (long postid); /// /// Removes the comment. /// /// The comment. /// Cmtid. public abstract long RemoveComment (long cmtid); /// /// Lasts the posts for this application. /// /// The posts. /// Page index. /// Page size. /// Total records. public abstract BlogEntryCollection LastPosts(int pageIndex, int pageSize, out int totalRecords); /// /// Returns the user's blog title. /// /// The title. /// Username. public abstract string BlogTitle (string username); /// /// Saves a comment from specified user /// on the specided post using the specified content. /// /// From. /// Postid. /// Content. public abstract long Comment (string from, long postid, string content); /// /// Gets the comments on a specided post by identifier postid. /// /// The comments. /// Postid. /// If set to true get hidden. public abstract Comment[] GetComments (long postid, bool getHidden) ; /// /// Gets or sets a value indicating whether this auto validates comments. /// /// true if auto validate comment; otherwise, false. public abstract bool AutoValidatesComments { get; set; } /// /// Validates the comment. /// /// Cmtid. public abstract void ValidateComment (long cmtid); /// /// Updates the comment. /// /// Cmtid. /// Content. /// If set to true visible. public abstract void UpdateComment (long cmtid, string content, bool visible); /// /// Tag the specified post by identifier /// using the given tag. /// /// Postid. /// Tag. public abstract long Tag (long postid, string tag); /// /// Uns the tag. /// /// Postid. /// Tagid. public abstract void Untag (long postid, long tagid); /// /// Uns the tag. /// /// Postid. /// Name. public abstract void Untag (long postid, string name); /// /// Removes the tag. /// /// Tagid. public abstract void DropTag (long tagid); /// /// Updates the post photo. /// /// Pid. /// Photo. public abstract void UpdatePostPhoto (long pid, string photo); } }