yavsc/yavscModel/Blogs/BlogProvider.cs
Paul Schneider 7bf9b6a771 a note on billls,
+refactoring

* instdbws.sql:
* BlogsController.cs:
* NpgsqlBlogProvider.cs: Implements the note

* robots.txt:
* Web.config:
* Web.csproj:
* Catalog.xml:
* Global.asax.cs:
* pgsql.xcf:
* p8-av4.png:
* pgsql.jpeg:
* logoDev.png:
* logoDev.xcf:
* debian-pb.gif:
* apache_pb.gif:
* theme.css:
* style.css:
* apache_pby.gif:
* apache_pbw.gif:
* Book.aspx:
* jquery-ui.css:
* Login.aspx:
* debian-powered.png:
* BlogManager.cs:
* FhHRx.gif:
* pgsql.png:
* TagControl.ascx:
* jquery-ui.min.css:
* BlogProvider.cs:
* theme.css:
* p8-av4.s.jpg:
* test-domain-TestAPI.config:
* noavatar.png:
* p8-av4.xxs.jpg:
* apache_pbw.png:
* debian-logo.png:
* TestCatalogInit.cs:
* Mono-powered.png:
* helix-nebula-1400x1400.l.jpg:
* star-939235_1280.jpg:
* animated-overlay.gif:
* star-939235_1280.s.jpg:
* sign-in-with-google.png:
* star-939235_1280.xxs.jpg:
* sign-in-with-google-s.png:
* helix-nebula-1400x1400.jpg:
* helix-nebula-1400x1400.s.jpg:
* helix-nebula-1400x1400.xxs.jpg: removes the /images folder from the app root folder,
  all images are moved to /App_Themes/images
2015-11-04 11:04:22 +01:00

189 lines
6.2 KiB
C#

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