C# Class Sitecore.Modules.WeBlog.MetaBlogApi

Inheritance: CookComputing.XmlRpc.XmlRpcService
显示文件 Open project: WeTeam/WeBlog Class Usage Examples

Public Methods

Method Description
MetaBlogApi ( ) : System
MetaBlogApi ( IBlogManager blogManager, ICategoryManager categoryManager, IEntryManager entryManager ) : System

Protected Methods

Method Description
Authenticate ( string username, string password ) : void

Authenticate user

CheckUserCreateRights ( string path ) : void

Ensure the context user has create rights to the item given by path.

If the item in the path doesn't exist, the ancestors will be checked until an item is found to exist.

CheckUserRights ( string blogid ) : void

Ensure the user has adequate rights to the blog.

GetBlog ( string blogId ) : BlogHomeItem

Gets the blog given by the provided ID

GetCategoriesAsString ( System.Item postItem, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : string

Gets the categories as string.

GetContentDatabase ( ) : Database

Gets the database where content is authored

Private Methods

Method Description
CheckUserRights ( string blogid, string username ) : void
GetCategoriesAsString ( ID BlogID, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : string
GetCategoriesAsString ( string postid, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : string
SetItemData ( System.Item item, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : void

Sets the item data from an XML RPC struct

deletePost ( string appKey, string postid, string userName, string password, bool publish ) : bool
editPost ( string postid, string username, string password, CookComputing.XmlRpc.XmlRpcStruct rpcstruct, bool publish ) : bool
getCategories ( string blogid, string username, string password ) : CookComputing.XmlRpc.XmlRpcStruct[]
getPost ( string postid, string username, string password ) : CookComputing.XmlRpc.XmlRpcStruct
getRecentPosts ( string blogid, string username, string password, int numberOfPosts ) : CookComputing.XmlRpc.XmlRpcStruct[]
getTemplate ( string appKey, string blogid, string username, string password, string templateType ) : string
getUsersBlogs ( string appKey, string username, string password ) : CookComputing.XmlRpc.XmlRpcStruct[]
newMediaObject ( string blogid, string username, string password, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : CookComputing.XmlRpc.XmlRpcStruct
newPost ( string blogid, string username, string password, CookComputing.XmlRpc.XmlRpcStruct rpcstruct, bool publish ) : string
pingback ( string sourceUri, string targetUri ) : void

Method Details

Authenticate() protected method

Authenticate user
protected Authenticate ( string username, string password ) : void
username string UserName
password string Password
return void

CheckUserCreateRights() protected method

Ensure the context user has create rights to the item given by path.
If the item in the path doesn't exist, the ancestors will be checked until an item is found to exist.
protected CheckUserCreateRights ( string path ) : void
path string The path of the item to check the rights on.
return void

CheckUserRights() protected method

Ensure the user has adequate rights to the blog.
protected CheckUserRights ( string blogid ) : void
blogid string The ID of the blog to check the rights of.
return void

GetBlog() protected method

Gets the blog given by the provided ID
protected GetBlog ( string blogId ) : BlogHomeItem
blogId string The ID of the blog to get
return Sitecore.Modules.WeBlog.Data.Items.BlogHomeItem

GetCategoriesAsString() protected method

Gets the categories as string.
protected GetCategoriesAsString ( System.Item postItem, CookComputing.XmlRpc.XmlRpcStruct rpcstruct ) : string
postItem System.Item
rpcstruct CookComputing.XmlRpc.XmlRpcStruct The rpcstruct.
return string

GetContentDatabase() protected method

Gets the database where content is authored
protected GetContentDatabase ( ) : Database
return Database

MetaBlogApi() public method

public MetaBlogApi ( ) : System
return System

MetaBlogApi() public method

public MetaBlogApi ( IBlogManager blogManager, ICategoryManager categoryManager, IEntryManager entryManager ) : System
blogManager IBlogManager
categoryManager ICategoryManager
entryManager IEntryManager
return System