C# Class Sitecore.Modules.WeBlog.Managers.EntryManager

Provides utilities for working with blog entries
Inheritance: IEntryManager
Mostra file Open project: WeTeam/WeBlog Class Usage Examples

Protected Properties

Property Type Description
ReportDataProvider ReportDataProviderBase
Settings IWeBlogSettings

Public Methods

Method Description
DeleteEntry ( string postID, Database db ) : bool

Deletes a blog post

EntryManager ( ) : Sitecore.Analytics.Reporting
EntryManager ( IWeBlogSettings settings ) : Sitecore.Analytics.Reporting
EntryManager ( ReportDataProviderBase reportDataProvider, IWeBlogSettings settings ) : Sitecore.Analytics.Reporting
GetBlogEntries ( ID blogID, Database database, int maxNumber ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets blog entries for the given blog up to the maximum number given

GetBlogEntries ( ID blogID, Database database, int maxNumber, string tag ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets blog entries for the given blog up to the maximum number given

GetBlogEntries ( System.Item blogItem ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets blog entries for the given blog

GetBlogEntries ( System.Item blog, int maxNumber, string tag, string category, System.DateTime minimumDate = null, System.DateTime maximumDate = null ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets blog entries for the given blog up to the maximum number given

GetBlogEntriesByMonthAndYear ( System.Item blog, int month, int year ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets the blog entries for a particular month and year.

GetBlogEntryByComment ( Sitecore.Modules.WeBlog.Items.WeBlog.CommentItem commentItem ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem

Gets the entry item for the current comment.

GetPopularEntriesByComment ( System.Item blogItem, int maxCount ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets the most popular entries for the blog by the number of comments on the entry

GetPopularEntriesByView ( System.Item blogItem, int maxCount ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Gets the most popular entries for the blog by the number of page views

Protected Methods

Method Description
AnalyticsEnabled ( ) : bool
GetItemViews ( ID itemId ) : long

Gets the number of views for the item given by ID.

Private Methods

Method Description
DeleteEntry ( string postID ) : bool
GetBlogEntries ( ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( ID blogID, int maxNumber ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( ID blogID, int maxNumber, string tag ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( System.Item blog, int maxNumber, string tag, string category, string datePrefix = null ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( int maxNumber ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( int maxNumber, string tag ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntries ( string tag ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntriesByMonthAndYear ( int month, int year ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntryByCategorie ( ID blogId, ID categoryId ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetBlogEntryByCategorie ( ID blogId, string categorieName ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
GetCurrentBlogEntry ( ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem
GetCurrentBlogEntry ( System.Item item ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem
MakeSortedEntriesList ( IList array ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Method Details

AnalyticsEnabled() protected static method

protected static AnalyticsEnabled ( ) : bool
return bool

DeleteEntry() public method

Deletes a blog post
public DeleteEntry ( string postID, Database db ) : bool
postID string The ID of the post to delete
db Database The database to delete the entry from
return bool

EntryManager() public method

public EntryManager ( ) : Sitecore.Analytics.Reporting
return Sitecore.Analytics.Reporting

EntryManager() public method

public EntryManager ( IWeBlogSettings settings ) : Sitecore.Analytics.Reporting
settings IWeBlogSettings
return Sitecore.Analytics.Reporting

EntryManager() public method

public EntryManager ( ReportDataProviderBase reportDataProvider, IWeBlogSettings settings ) : Sitecore.Analytics.Reporting
reportDataProvider ReportDataProviderBase
settings IWeBlogSettings
return Sitecore.Analytics.Reporting

GetBlogEntries() public method

Gets blog entries for the given blog up to the maximum number given
public GetBlogEntries ( ID blogID, Database database, int maxNumber ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blogID ID The ID of the blog to get the entries for
database Database The database to get the blog from
maxNumber int The maximum number of entries to retrieve
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetBlogEntries() public method

Gets blog entries for the given blog up to the maximum number given
public GetBlogEntries ( ID blogID, Database database, int maxNumber, string tag ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blogID ID The ID of the blog to get the entries for
database Database The database to get the blog from
maxNumber int The maximum number of entries to retrieve
tag string A tag the entry must contain
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetBlogEntries() public method

Gets blog entries for the given blog
public GetBlogEntries ( System.Item blogItem ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blogItem System.Item The blog item to retrieve the entries for
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetBlogEntries() public method

Gets blog entries for the given blog up to the maximum number given
public GetBlogEntries ( System.Item blog, int maxNumber, string tag, string category, System.DateTime minimumDate = null, System.DateTime maximumDate = null ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blog System.Item The blog item to get the entries for
maxNumber int The maximum number of entries to retrieve
tag string A tag the entry must contain
category string A category the entry must contain
minimumDate System.DateTime The minimum date for entries
maximumDate System.DateTime The maximum date for the entries
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetBlogEntriesByMonthAndYear() public method

Gets the blog entries for a particular month and year.
public GetBlogEntriesByMonthAndYear ( System.Item blog, int month, int year ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blog System.Item
month int The month to get the entries for
year int The year to get the entries for
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetBlogEntryByComment() public method

Gets the entry item for the current comment.
public GetBlogEntryByComment ( Sitecore.Modules.WeBlog.Items.WeBlog.CommentItem commentItem ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem
commentItem Sitecore.Modules.WeBlog.Items.WeBlog.CommentItem The comment item.
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem

GetItemViews() protected method

Gets the number of views for the item given by ID.
protected GetItemViews ( ID itemId ) : long
itemId ID The ID of the item to get the views for.
return long

GetPopularEntriesByComment() public method

Gets the most popular entries for the blog by the number of comments on the entry
public GetPopularEntriesByComment ( System.Item blogItem, int maxCount ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blogItem System.Item The blog to find the most popular pages for
maxCount int The maximum number of entries to return
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

GetPopularEntriesByView() public method

Gets the most popular entries for the blog by the number of page views
public GetPopularEntriesByView ( System.Item blogItem, int maxCount ) : Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]
blogItem System.Item The blog to find the most popular pages for
maxCount int The maximum number of entries to return
return Sitecore.Modules.WeBlog.Items.WeBlog.EntryItem[]

Property Details

ReportDataProvider protected_oe property

The ReportDataProviderBase to read reporting data from.
protected ReportDataProviderBase ReportDataProvider
return ReportDataProviderBase

Settings protected_oe property

The settings to use.
protected IWeBlogSettings Settings
return IWeBlogSettings