C# 클래스 Subtext.Framework.Data.DatabaseObjectProvider

파일 보기 프로젝트 열기: ayende/Subtext 1 사용 예제들

공개 메소드들

메소드 설명
ClearBlogContent ( int blogId ) : void
Create ( Enclosure enclosure ) : int
Create ( Entry entry, int categoryIds ) : int

Creates the specified entry in the back end data store attaching the specified category ids.

Create ( FeedbackItem feedbackItem ) : int
Create ( MetaTag metaTag ) : int
CreateBlog ( string title, string userName, string password, string host, string subfolder ) : bool

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.

CreateBlog ( string title, string userName, string password, string host, string subfolder, int blogGroupId ) : bool

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.

CreateBlogAlias ( BlogAlias alias ) : bool
CreateLink ( Link link ) : int
CreateLinkCategory ( LinkCategory lc ) : int
Delete ( int entryId ) : bool

Deletes the specified entry.

DeleteBlogAlias ( BlogAlias alias ) : bool
DeleteEnclosure ( int enclosureId ) : bool
DeleteImage ( int ImageID ) : bool
DeleteKeyWord ( int id ) : bool
DeleteLink ( int LinkID ) : bool
DeleteLinkCategory ( int CategoryID ) : bool
DeleteMetaTag ( int metaTagId ) : bool
DestroyFeedback ( FeedbackStatusFlag status ) : void
DestroyFeedback ( int id ) : void

Completely deletes the feedback from the system.

GetActiveCategories ( ) : IList
GetBlogAliasById ( int aliasId ) : BlogAlias
GetBlogByDomainAlias ( string host, string subfolder, bool strict ) : BlogInfo
GetBlogById ( int blogId ) : BlogInfo

Gets the blog by id.

GetBlogGroup ( int id, bool activeOnly ) : BlogGroup

Gets the blog group.

GetBlogInfo ( string hostname, string subfolder, bool strict ) : BlogInfo

Returns a BlogInfo instance containing the configuration settings for the blog specified by the Hostname and Application.

Until Subtext supports multiple blogs again (if ever), this will always return the same instance.

GetBlogPosts ( int itemCount, PostConfig pc ) : IList

Returns blog posts that meet the criteria specified in the PostConfig flags.

GetCategories ( CategoryType catType, bool activeOnly ) : IList

Gets the categories for the specified category type.

GetCommentByChecksumHash ( string checksumHash ) : Entry

Searches the data store for the first comment with a matching checksum hash.

GetConditionalEntries ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList

Gets the entries that meet the specific PostType and the PostConfig flags.

This is called to get the main syndicated entries.

GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
GetEntriesByTag ( int itemCount, string tagName ) : IList
GetEntry ( int id, bool includeCategories ) : Entry

Returns an active Entry by the id regardless of which blog it is located in.

GetEntry ( int id, bool activeOnly, bool includeCategories ) : Entry

Returns an Entry with the specified id.

GetEntry ( string entryName, bool activeOnly, bool includeCategories ) : Entry

Returns an Entry with the specified entry name.

GetEntryDay ( DateTime dt ) : EntryDay
GetFeedback ( int id ) : FeedbackItem

Returns the feedback by id.

GetFeedbackCounts ( int &approved, int &needsModeration, int &flaggedAsSpam, int &deleted ) : void

Gets the feedback counts for the various top level statuses.

GetFeedbackForEntry ( Entry parentEntry ) : IList

Returns all the active entries for the specified post.

GetImage ( int imageID, bool activeOnly ) : Image
GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
GetKeyWord ( int KeyWordID ) : KeyWord
GetKeyWords ( ) : IList
GetLink ( int linkID ) : Link
GetLinkCategory ( int categoryId, bool activeOnly ) : LinkCategory

Gets the link category for the specified category id.

GetLinkCategory ( string categoryName, bool activeOnly ) : LinkCategory

Gets the link category for the specified category name.

GetLinkCollectionByPostID ( int PostID ) : IList
GetMetaTagsForBlog ( BlogInfo blog, int pageIndex, int pageSize ) : IPagedCollection
GetMetaTagsForEntry ( Entry entry, int pageIndex, int pageSize ) : IPagedCollection
GetPagedBlogDomainAlias ( BlogInfo blog, int pageIndex, int pageSize ) : PagedCollection
GetPagedBlogs ( string host, int pageIndex, int pageSize, ConfigurationFlags flags ) : PagedCollection

Gets a pageable IList of BlogInfo instances.

GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection

Returns a pageable collection of entries ordered by the id descending. This is used in the admin section.

GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection

Gets the paged feedback.

GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
GetPagedLinks ( int categoryTypeID, int pageIndex, int pageSize, bool sortDescending ) : IPagedCollection
GetPagedReferrers ( int pageIndex, int pageSize, int entryId ) : IPagedCollection
GetPagedViewStats ( int pageIndex, int pageSize, DateTime beginDate, DateTime endDate ) : IPagedCollection
GetPostCollectionByMonth ( int month, int year ) : IList
GetPostsByCategoryArchive ( ) : IList
GetPostsByCategoryID ( int itemCount, int catID ) : IList
GetPostsByDayRange ( DateTime start, DateTime stop, PostType postType, bool activeOnly ) : IList
GetPostsByMonth ( int month, int year ) : IList
GetPostsByMonthArchive ( ) : IList
GetPostsByYearArchive ( ) : IList
GetPreviousAndNextEntries ( int entryId, PostType postType ) : IList

Returns the previous and next entry to the specified entry.

GetTopTags ( int ItemCount ) : int>.IDictionary
InsertImage ( Image _image ) : int
InsertKeyWord ( KeyWord keyWord ) : int
ListBlogGroups ( bool activeOnly ) : IList

Lists the blog groups.

LoadHostInfo ( HostInfo hostInfo ) : HostInfo

Returns the HostInfo for the Subtext installation.

SetEntryCategoryList ( int entryId, int categoryIds ) : bool
SetEntryTagList ( int entryId, IList tags ) : bool
TrackEntry ( EntryView ev ) : bool
TrackEntry ( IEnumerable evc ) : bool
Update ( Enclosure enclosure ) : bool
Update ( Entry entry ) : bool

Saves changes to the specified entry attaching the specified categories.

Update ( FeedbackItem feedbackItem ) : bool

Saves changes to the specified feedback.

Update ( MetaTag metaTag ) : bool
UpdateBlog ( BlogInfo info ) : bool
UpdateBlogAlias ( BlogAlias alias ) : bool
UpdateHost ( HostInfo host ) : bool

Updates the HostInfo instance. If the host record is not in the database, one is created. There should only be one host record.

UpdateImage ( Image image ) : bool
UpdateKeyWord ( KeyWord keyWord ) : bool
UpdateLink ( Link link ) : bool
UpdateLinkCategory ( LinkCategory lc ) : bool

비공개 메소드들

메소드 설명
FormatEntry ( Entry e, bool UseKeyWords ) : bool
LoadLinkCategoryFromReader ( IDataReader reader ) : LinkCategory
LoadPagedReferrersCollection ( IDataReader reader ) : IPagedCollection

메소드 상세

ClearBlogContent() 공개 메소드

public ClearBlogContent ( int blogId ) : void
blogId int
리턴 void

Create() 공개 메소드

public Create ( Enclosure enclosure ) : int
enclosure Subtext.Framework.Components.Enclosure
리턴 int

Create() 공개 메소드

Creates the specified entry in the back end data store attaching the specified category ids.
public Create ( Entry entry, int categoryIds ) : int
entry Subtext.Framework.Components.Entry Entry.
categoryIds int Category I ds.
리턴 int

Create() 공개 메소드

public Create ( FeedbackItem feedbackItem ) : int
feedbackItem Subtext.Framework.Components.FeedbackItem
리턴 int

Create() 공개 메소드

public Create ( MetaTag metaTag ) : int
metaTag Subtext.Framework.Components.MetaTag
리턴 int

CreateBlog() 공개 메소드

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.
public CreateBlog ( string title, string userName, string password, string host, string subfolder ) : bool
title string
userName string Name of the user.
password string Password.
host string
subfolder string
리턴 bool

CreateBlog() 공개 메소드

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.
public CreateBlog ( string title, string userName, string password, string host, string subfolder, int blogGroupId ) : bool
title string
userName string Name of the user.
password string Password.
host string
subfolder string
blogGroupId int
리턴 bool

CreateBlogAlias() 공개 메소드

public CreateBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
리턴 bool

CreateLink() 공개 메소드

public CreateLink ( Link link ) : int
link Subtext.Framework.Components.Link
리턴 int

CreateLinkCategory() 공개 메소드

public CreateLinkCategory ( LinkCategory lc ) : int
lc Subtext.Framework.Components.LinkCategory
리턴 int

Delete() 공개 메소드

Deletes the specified entry.
public Delete ( int entryId ) : bool
entryId int The entry id.
리턴 bool

DeleteBlogAlias() 공개 메소드

public DeleteBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
리턴 bool

DeleteEnclosure() 공개 메소드

public DeleteEnclosure ( int enclosureId ) : bool
enclosureId int
리턴 bool

DeleteImage() 공개 메소드

public DeleteImage ( int ImageID ) : bool
ImageID int
리턴 bool

DeleteKeyWord() 공개 메소드

public DeleteKeyWord ( int id ) : bool
id int
리턴 bool

DeleteLink() 공개 메소드

public DeleteLink ( int LinkID ) : bool
LinkID int
리턴 bool

DeleteLinkCategory() 공개 메소드

public DeleteLinkCategory ( int CategoryID ) : bool
CategoryID int
리턴 bool

DeleteMetaTag() 공개 메소드

public DeleteMetaTag ( int metaTagId ) : bool
metaTagId int
리턴 bool

DestroyFeedback() 공개 메소드

public DestroyFeedback ( FeedbackStatusFlag status ) : void
status FeedbackStatusFlag
리턴 void

DestroyFeedback() 공개 메소드

Completely deletes the feedback from the system.
public DestroyFeedback ( int id ) : void
id int The id.
리턴 void

GetActiveCategories() 공개 메소드

public GetActiveCategories ( ) : IList
리턴 IList

GetBlogAliasById() 공개 메소드

public GetBlogAliasById ( int aliasId ) : BlogAlias
aliasId int
리턴 BlogAlias

GetBlogByDomainAlias() 공개 메소드

public GetBlogByDomainAlias ( string host, string subfolder, bool strict ) : BlogInfo
host string
subfolder string
strict bool
리턴 BlogInfo

GetBlogById() 공개 메소드

Gets the blog by id.
public GetBlogById ( int blogId ) : BlogInfo
blogId int Blog id.
리턴 BlogInfo

GetBlogGroup() 공개 메소드

Gets the blog group.
public GetBlogGroup ( int id, bool activeOnly ) : BlogGroup
id int The id.
activeOnly bool if set to true [active only].
리턴 Subtext.Framework.Components.BlogGroup

GetBlogInfo() 공개 메소드

Returns a BlogInfo instance containing the configuration settings for the blog specified by the Hostname and Application.
Until Subtext supports multiple blogs again (if ever), this will always return the same instance.
public GetBlogInfo ( string hostname, string subfolder, bool strict ) : BlogInfo
hostname string Hostname.
subfolder string Subfolder.
strict bool If false, then this will return a blog record if /// there is only one blog record, regardless if the subfolder and hostname match.
리턴 BlogInfo

GetBlogPosts() 공개 메소드

Returns blog posts that meet the criteria specified in the PostConfig flags.
public GetBlogPosts ( int itemCount, PostConfig pc ) : IList
itemCount int Item count.
pc PostConfig Pc.
리턴 IList

GetCategories() 공개 메소드

Gets the categories for the specified category type.
public GetCategories ( CategoryType catType, bool activeOnly ) : IList
catType CategoryType Type of the cat.
activeOnly bool if set to true [active only].
리턴 IList

GetCommentByChecksumHash() 공개 메소드

Searches the data store for the first comment with a matching checksum hash.
public GetCommentByChecksumHash ( string checksumHash ) : Entry
checksumHash string Checksum hash.
리턴 Subtext.Framework.Components.Entry

GetConditionalEntries() 공개 메소드

Gets the entries that meet the specific PostType and the PostConfig flags.
This is called to get the main syndicated entries.
public GetConditionalEntries ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList
itemCount int Item count.
postType PostType The type of post to retrieve.
postConfig PostConfig Post configuration options.
includeCategories bool Whether or not to include categories
리턴 IList

GetEntriesByCategory() 공개 메소드

public GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
itemCount int
catID int
activeOnly bool
리턴 IList

GetEntriesByTag() 공개 메소드

public GetEntriesByTag ( int itemCount, string tagName ) : IList
itemCount int
tagName string
리턴 IList

GetEntry() 공개 메소드

Returns an active Entry by the id regardless of which blog it is located in.
public GetEntry ( int id, bool includeCategories ) : Entry
id int Id of the entry
includeCategories bool Whether the entry should have its Categories property populated
리턴 Subtext.Framework.Components.Entry

GetEntry() 공개 메소드

Returns an Entry with the specified id.
public GetEntry ( int id, bool activeOnly, bool includeCategories ) : Entry
id int Id of the entry
activeOnly bool Whether or not to only return the entry if it is active.
includeCategories bool Whether the entry should have its Categories property populated
리턴 Subtext.Framework.Components.Entry

GetEntry() 공개 메소드

Returns an Entry with the specified entry name.
public GetEntry ( string entryName, bool activeOnly, bool includeCategories ) : Entry
entryName string Url friendly entry name.
activeOnly bool Whether or not to only return the entry if it is active.
includeCategories bool Whether the entry should have its Categories property populated
리턴 Subtext.Framework.Components.Entry

GetEntryDay() 공개 메소드

public GetEntryDay ( DateTime dt ) : EntryDay
dt DateTime
리턴 EntryDay

GetFeedback() 공개 메소드

Returns the feedback by id.
public GetFeedback ( int id ) : FeedbackItem
id int
리턴 Subtext.Framework.Components.FeedbackItem

GetFeedbackCounts() 공개 메소드

Gets the feedback counts for the various top level statuses.
public GetFeedbackCounts ( int &approved, int &needsModeration, int &flaggedAsSpam, int &deleted ) : void
approved int The approved.
needsModeration int The needs moderation.
flaggedAsSpam int The flagged as spam.
deleted int The deleted.
리턴 void

GetFeedbackForEntry() 공개 메소드

Returns all the active entries for the specified post.
public GetFeedbackForEntry ( Entry parentEntry ) : IList
parentEntry Subtext.Framework.Components.Entry
리턴 IList

GetImage() 공개 메소드

public GetImage ( int imageID, bool activeOnly ) : Image
imageID int
activeOnly bool
리턴 Subtext.Framework.Components.Image

GetImagesByCategoryID() 공개 메소드

public GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
catID int
activeOnly bool
리턴 ImageCollection

GetKeyWord() 공개 메소드

public GetKeyWord ( int KeyWordID ) : KeyWord
KeyWordID int
리턴 Subtext.Framework.Components.KeyWord

GetKeyWords() 공개 메소드

public GetKeyWords ( ) : IList
리턴 IList

GetLink() 공개 메소드

public GetLink ( int linkID ) : Link
linkID int
리턴 Subtext.Framework.Components.Link

GetLinkCategory() 공개 메소드

Gets the link category for the specified category id.
public GetLinkCategory ( int categoryId, bool activeOnly ) : LinkCategory
categoryId int The category id.
activeOnly bool if set to true [active only].
리턴 Subtext.Framework.Components.LinkCategory

GetLinkCategory() 공개 메소드

Gets the link category for the specified category name.
public GetLinkCategory ( string categoryName, bool activeOnly ) : LinkCategory
categoryName string The category name.
activeOnly bool if set to true [active only].
리턴 Subtext.Framework.Components.LinkCategory

GetLinkCollectionByPostID() 공개 메소드

public GetLinkCollectionByPostID ( int PostID ) : IList
PostID int
리턴 IList

GetMetaTagsForBlog() 공개 메소드

public GetMetaTagsForBlog ( BlogInfo blog, int pageIndex, int pageSize ) : IPagedCollection
blog BlogInfo
pageIndex int
pageSize int
리턴 IPagedCollection

GetMetaTagsForEntry() 공개 메소드

public GetMetaTagsForEntry ( Entry entry, int pageIndex, int pageSize ) : IPagedCollection
entry Subtext.Framework.Components.Entry
pageIndex int
pageSize int
리턴 IPagedCollection

GetPagedBlogDomainAlias() 공개 메소드

public GetPagedBlogDomainAlias ( BlogInfo blog, int pageIndex, int pageSize ) : PagedCollection
blog BlogInfo
pageIndex int
pageSize int
리턴 PagedCollection

GetPagedBlogs() 공개 메소드

Gets a pageable IList of BlogInfo instances.
public GetPagedBlogs ( string host, int pageIndex, int pageSize, ConfigurationFlags flags ) : PagedCollection
host string The host filter. Set to null to return all blogs.
pageIndex int Page index.
pageSize int Size of the page.
flags ConfigurationFlags
리턴 PagedCollection

GetPagedEntries() 공개 메소드

Returns a pageable collection of entries ordered by the id descending. This is used in the admin section.
public GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection
postType PostType Type of the post.
categoryID int The category ID.
pageIndex int Index of the page.
pageSize int Size of the page.
리턴 IPagedCollection

GetPagedFeedback() 공개 메소드

Gets the paged feedback.
public GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection
pageIndex int Index of the page.
pageSize int Size of the page.
status FeedbackStatusFlag A flag for the status types to return.
excludeStatusMask FeedbackStatusFlag A flag for the statuses to exclude.
type FeedbackType The type of feedback to return.
리턴 IPagedCollection

GetPagedKeyWords() 공개 메소드

public GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
pageIndex int
pageSize int
리턴 IPagedCollection

GetPagedLinks() 공개 메소드

public GetPagedLinks ( int categoryTypeID, int pageIndex, int pageSize, bool sortDescending ) : IPagedCollection
categoryTypeID int
pageIndex int
pageSize int
sortDescending bool
리턴 IPagedCollection

GetPagedReferrers() 공개 메소드

public GetPagedReferrers ( int pageIndex, int pageSize, int entryId ) : IPagedCollection
pageIndex int
pageSize int
entryId int
리턴 IPagedCollection

GetPagedViewStats() 공개 메소드

public GetPagedViewStats ( int pageIndex, int pageSize, DateTime beginDate, DateTime endDate ) : IPagedCollection
pageIndex int
pageSize int
beginDate DateTime
endDate DateTime
리턴 IPagedCollection

GetPostCollectionByMonth() 공개 메소드

public GetPostCollectionByMonth ( int month, int year ) : IList
month int
year int
리턴 IList

GetPostsByCategoryArchive() 공개 메소드

public GetPostsByCategoryArchive ( ) : IList
리턴 IList

GetPostsByCategoryID() 공개 메소드

public GetPostsByCategoryID ( int itemCount, int catID ) : IList
itemCount int
catID int
리턴 IList

GetPostsByDayRange() 공개 메소드

public GetPostsByDayRange ( DateTime start, DateTime stop, PostType postType, bool activeOnly ) : IList
start DateTime
stop DateTime
postType PostType
activeOnly bool
리턴 IList

GetPostsByMonth() 공개 메소드

public GetPostsByMonth ( int month, int year ) : IList
month int
year int
리턴 IList

GetPostsByMonthArchive() 공개 메소드

public GetPostsByMonthArchive ( ) : IList
리턴 IList

GetPostsByYearArchive() 공개 메소드

public GetPostsByYearArchive ( ) : IList
리턴 IList

GetPreviousAndNextEntries() 공개 메소드

Returns the previous and next entry to the specified entry.
public GetPreviousAndNextEntries ( int entryId, PostType postType ) : IList
entryId int
postType PostType
리턴 IList

GetTopTags() 공개 메소드

public GetTopTags ( int ItemCount ) : int>.IDictionary
ItemCount int
리턴 int>.IDictionary

InsertImage() 공개 메소드

public InsertImage ( Image _image ) : int
_image Subtext.Framework.Components.Image
리턴 int

InsertKeyWord() 공개 메소드

public InsertKeyWord ( KeyWord keyWord ) : int
keyWord Subtext.Framework.Components.KeyWord
리턴 int

ListBlogGroups() 공개 메소드

Lists the blog groups.
public ListBlogGroups ( bool activeOnly ) : IList
activeOnly bool if set to true [active only].
리턴 IList

LoadHostInfo() 공개 메소드

Returns the HostInfo for the Subtext installation.
public LoadHostInfo ( HostInfo hostInfo ) : HostInfo
hostInfo HostInfo
리턴 HostInfo

SetEntryCategoryList() 공개 메소드

public SetEntryCategoryList ( int entryId, int categoryIds ) : bool
entryId int
categoryIds int
리턴 bool

SetEntryTagList() 공개 메소드

public SetEntryTagList ( int entryId, IList tags ) : bool
entryId int
tags IList
리턴 bool

TrackEntry() 공개 메소드

public TrackEntry ( EntryView ev ) : bool
ev Subtext.Framework.Components.EntryView
리턴 bool

TrackEntry() 공개 메소드

public TrackEntry ( IEnumerable evc ) : bool
evc IEnumerable
리턴 bool

Update() 공개 메소드

public Update ( Enclosure enclosure ) : bool
enclosure Subtext.Framework.Components.Enclosure
리턴 bool

Update() 공개 메소드

Saves changes to the specified entry attaching the specified categories.
public Update ( Entry entry ) : bool
entry Subtext.Framework.Components.Entry Entry.
리턴 bool

Update() 공개 메소드

Saves changes to the specified feedback.
public Update ( FeedbackItem feedbackItem ) : bool
feedbackItem Subtext.Framework.Components.FeedbackItem The feedback item.
리턴 bool

Update() 공개 메소드

public Update ( MetaTag metaTag ) : bool
metaTag Subtext.Framework.Components.MetaTag
리턴 bool

UpdateBlog() 공개 메소드

public UpdateBlog ( BlogInfo info ) : bool
info BlogInfo
리턴 bool

UpdateBlogAlias() 공개 메소드

public UpdateBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
리턴 bool

UpdateHost() 공개 메소드

Updates the HostInfo instance. If the host record is not in the database, one is created. There should only be one host record.
public UpdateHost ( HostInfo host ) : bool
host HostInfo The host information.
리턴 bool

UpdateImage() 공개 메소드

public UpdateImage ( Image image ) : bool
image Subtext.Framework.Components.Image
리턴 bool

UpdateKeyWord() 공개 메소드

public UpdateKeyWord ( KeyWord keyWord ) : bool
keyWord Subtext.Framework.Components.KeyWord
리턴 bool

UpdateLink() 공개 메소드

public UpdateLink ( Link link ) : bool
link Subtext.Framework.Components.Link
리턴 bool

UpdateLinkCategory() 공개 메소드

public UpdateLinkCategory ( LinkCategory lc ) : bool
lc Subtext.Framework.Components.LinkCategory
리턴 bool