|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlogManager
Manages blogs, including viewing, creating, and deleting them. If you wish to use a custom implementation, you must set the Jive property BlogManager.className with the name of your BlogManager class. Your class must have a public, no-argument constructor. The class must also create and return Blog object implementations as necessary.
Blog| Method Summary | |
|---|---|
void |
addBlog(Blog blog)
Adds a blog to the database. |
Blog |
createBlog(User user)
Creates a new blog. |
void |
deleteBlog(Blog blog)
Permanently deletes a blog and all of the blog postings and comments associated with the blog. |
Blog |
getBlog(long blogID)
Returns a blog by blog ID. |
Blog |
getBlog(java.lang.String displayName)
Returns a blog by blog display name. |
int |
getBlogCount()
Returns the total number of blogs on this system. |
int |
getBlogCount(com.jivesoftware.community.BlogResultFilter resultFilter)
Returns the total number of blogs on this system that match the criteria specified by the ResultFilter. |
BlogPost |
getBlogPost(long blogPostID)
Returns the BlogPost specified by the blog post ID. |
int |
getBlogPostCount()
Returns the number of blog posts on the system, by default only includes blog posts where status = BlogPost.STATUS_PUBLISH
and publish date less than now(). |
int |
getBlogPostCount(BlogPostResultFilter resultFilter)
Returns the number of blog posts on the system. |
JiveIterator<BlogPost> |
getBlogPosts(BlogPostResultFilter resultFilter)
Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on the entire system. |
JiveIterator<Blog> |
getBlogs(com.jivesoftware.community.BlogResultFilter resultFilter)
Returns all the blogs on this system that match the criteria specified by the ResultFilter. |
JiveIterator<Blog> |
getBlogs(User user)
Returns all blogs which are associated with the given user. |
JiveIterator<Blog> |
getBlogsByDisplayName(java.lang.String query,
int startIndex,
int endIndex,
int numResults)
Returns all the blogs on this system whose display name is LIKE the given query. |
int |
getBlogsCount(User user)
Returns the count of all blogs which are associated with the given user. |
int |
getCommentCount()
Returns the number of comments on blog posts in the system. |
int |
getCommentCount(FeedbackResultFilter resultFilter)
Returns the number of comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system. |
JiveIterator<Comment> |
getComments(FeedbackResultFilter resultFilter)
Returns all the comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system. |
InterceptorManager |
getInterceptorManager()
Returns an interceptor manager that can be used to manage interceptors for all the blogs in the system. |
java.lang.String |
getPingServices()
Returns a comma delimited list of available ping services for the system. |
JiveIterator<BlogPost> |
getPopularBlogPosts()
Returns the top x blog posts according to blog post views, number of comments & time passed since the blog post was created. |
JiveIterator<Blog> |
getRecentBlogs()
Returns (at most) the ten most recent blogs created on this system. |
java.util.Map<java.lang.String,java.lang.Integer> |
getTags()
Returns all tags for blogs in the system in a Map where the key is the
name of tag and the value is the number of times the tag has been used in this system. |
java.util.Map<java.lang.String,java.lang.Integer> |
getTags(BlogTagResultFilter resultFilter)
Returns all tags for blogs in the system in a Map where the key is the
name of tag and the value is the number of times the tag has been used in this system
filtered by the BlogTagResultFilter. |
int |
getTrackbackCount()
Returns the number of trackbacks on blog posts in the system. |
int |
getTrackbackCount(FeedbackResultFilter resultFilter)
Returns the number of trackbacks on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system. |
JiveIterator<Trackback> |
getTrackbacks(FeedbackResultFilter resultFilter)
Returns all the trackbacks on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system. |
boolean |
hasBlog(User user)
Returns true if the given user has one or more blogs, false if the user does not have a blog. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
boolean |
isBlogsEnabled()
Returns true if the blogs feature is turned on. |
boolean |
isCommentsEnabled()
Returns true if the comments feature is turned on. |
boolean |
isPingsEnabled()
Returns true if the pings feature is turned on. |
boolean |
isPingsOverrideEnabled()
Returns true if the system has been configured to allow users to override the ping URIs configured for the system. |
boolean |
isTrackbacksEnabled()
Returns true if the trackbacks feature is turned on. |
void |
setBlogsEnabled(boolean blogsEnabled)
Enables or disables the blogs feature. |
void |
setCommentsEnabled(boolean commentsEnabled)
Enables or disables the comments feature system wide. |
void |
setPingsEnabled(boolean pingsEnabled)
Enables or disables the pings feature system wide. |
void |
setPingServices(java.lang.String pingServices)
Sets the comma delimited list of available ping services for the system. |
void |
setPingsOverrideEnabled(boolean pingsOverrideEnabled)
Configures the system to allow users to override the ping URIs configured for all blogs. |
void |
setTrackbacksEnabled(boolean trackbacksEnabled)
Enables or disables the trackbacks feature system wide. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
boolean isBlogsEnabled()
void setBlogsEnabled(boolean blogsEnabled)
throws UnauthorizedException
blogsEnabled - true to enable the blogs feature, false to disable
UnauthorizedException - if not a system administratorboolean isCommentsEnabled()
void setCommentsEnabled(boolean commentsEnabled)
throws UnauthorizedException
commentsEnabled - true to enable the comments feature, false to disable
UnauthorizedException - if not a system administratorboolean isTrackbacksEnabled()
void setTrackbacksEnabled(boolean trackbacksEnabled)
throws UnauthorizedException
trackbacksEnabled - true to enable the trackback feature, false to disable
UnauthorizedException - if not a system administratorboolean isPingsEnabled()
void setPingsEnabled(boolean pingsEnabled)
throws UnauthorizedException
pingsEnabled - true to enable the ping feature, false to disable
UnauthorizedException - if not a system administratorboolean isPingsOverrideEnabled()
void setPingsOverrideEnabled(boolean pingsOverrideEnabled)
throws UnauthorizedException
pingsOverrideEnabled - true to enable users to override the system settings,
false to use system settings.
UnauthorizedException - if not a system administratorjava.lang.String getPingServices()
void setPingServices(java.lang.String pingServices)
throws UnauthorizedException
pingServices - comma delimited list of available ping services for the system.
UnauthorizedException - if not a system administrator
Blog createBlog(User user)
throws UnauthorizedException
addBlog(com.jivesoftware.community.Blog) method.
user - the user creating the blog.
UnauthorizedException - if not allowed to create a blog, not a system administrator
or not a community administrator
void addBlog(Blog blog)
throws UnauthorizedException
blog - the blog to add to the database.
UnauthorizedException - if not allowed to create a blog, not a system administrator
or not a community administrator
java.lang.IllegalStateException - if the blog has already been added.
void deleteBlog(Blog blog)
throws UnauthorizedException
blog - the blog to delete.
UnauthorizedException - if not a system administrator or not a community administrator
Blog getBlog(long blogID)
throws BlogNotFoundException,
UnauthorizedException
blogID - the ID of the blog to return.
BlogNotFoundException - if the blog could not be loaded
or does not exist.
UnauthorizedException - if not allowed to get the blog.
Blog getBlog(java.lang.String displayName)
throws BlogNotFoundException,
UnauthorizedException
displayName - the displayName of the blog to return.
BlogNotFoundException - if the blog could not be loaded
or does not exist.
UnauthorizedException - if not allowed to get the blog.int getBlogCount()
int getBlogCount(com.jivesoftware.community.BlogResultFilter resultFilter)
resultFilter - the besult filter holding the criteria to filter the blog count
JiveIterator<Blog> getBlogs(com.jivesoftware.community.BlogResultFilter resultFilter)
resultFilter - a ResultFilter object to perform filtering and sorting with.
JiveIterator<Blog> getBlogsByDisplayName(java.lang.String query,
int startIndex,
int endIndex,
int numResults)
query - a string to search blog display names by
JiveIterator<Blog> getRecentBlogs()
java.util.Map<java.lang.String,java.lang.Integer> getTags()
Map where the key is the
name of tag and the value is the number of times the tag has been used in this system.
Map where the key is the
name of tag and the value is the number of times the tag has been used in this system.java.util.Map<java.lang.String,java.lang.Integer> getTags(BlogTagResultFilter resultFilter)
Map where the key is the
name of tag and the value is the number of times the tag has been used in this system
filtered by the BlogTagResultFilter.
resultFilter - the filter to use to restrict tag results
Map where the key is the
name of tag and the value is the number of times the tag has been used in this system
filtered by the BlogTagResultFilter.
BlogPost getBlogPost(long blogPostID)
throws BlogPostNotFoundException
BlogPost specified by the blog post ID.
blogPostID - the ID of the blog post to return.
BlogPostNotFoundException - if the blog post could not be loaded
or does not exist.
UnauthorizedException - if not allowed to get the blog post.int getBlogPostCount()
BlogPost.STATUS_PUBLISH
and publish date less than now().
int getBlogPostCount(BlogPostResultFilter resultFilter)
BlogPostResultFilter.createDefaultFilter())
only includes blog posts where status =
BlogPost.STATUS_PUBLISH and publish date less than now().
resultFilter - the besult filter holding the criteria to filter the blogposts
JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter resultFilter)
resultFilter - a BlogPostResultFilter object to perform filtering and sorting with.
int getCommentCount()
int getCommentCount(FeedbackResultFilter resultFilter)
resultFilter - a FeedbackResultFilter object to perform filtering and sorting with.
JiveIterator<Comment> getComments(FeedbackResultFilter resultFilter)
resultFilter - a FeedbackResultFilter object to perform filtering and sorting with.
int getTrackbackCount()
int getTrackbackCount(FeedbackResultFilter resultFilter)
resultFilter - a FeedbackResultFilter object to perform filtering and sorting with.
JiveIterator<Trackback> getTrackbacks(FeedbackResultFilter resultFilter)
resultFilter - a FeedbackResultFilter object to perform filtering and sorting with.
boolean hasBlog(User user)
user - the user to check to see if they have a blog
JiveIterator<Blog> getBlogs(User user)
user - the user to find blogs for
int getBlogsCount(User user)
user - the user to find blogs for
JiveIterator<BlogPost> getPopularBlogPosts()
Top x of ((blog post views) * (number of blog post comments + 2)) * 1/(1 + number of days since creation date)
The number of blog posts to return is determined by the property "popularBlogPosts.number", defaulting to 5 if the property is not specified. Popular blog posts are only calculated once every 15 minutes.
boolean isAuthorized(long permissionType)
permissionType - permissionType a permission type.
Permissions
InterceptorManager getInterceptorManager()
throws UnauthorizedException
UnauthorizedException - if does not have admin permissions.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||