|
Clearspace API (2.5.18) 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. As of 2.1, blogs are no-longer represented as a system construct. Rather, they are now first-class content-types belonging to JiveContainers (similar to documents or threads). As a result, this API changed slightly to require creation of the blog with a container rather than a user.
Blog| Method Summary | |
|---|---|
void |
addBlog(Blog blog)
Adds a blog to the database. |
Blog |
createBlog(JiveContainer container)
Creates a new blog. |
Blog |
createBlog(User user)
Creates a blog for a user. |
void |
deleteBlog(Blog blog)
Permanently deletes a blog and all of the blog postings and comments associated with the blog. |
void |
deleteUserBlogs(User user)
Delete all blog related content by the given user. is deleted, which means any posts, comments, trackbacks and tags this blog contains will be removed. |
Blog |
getBlog(JiveContainer container)
Returns the blog for the given container. |
Blog |
getBlog(long blogID)
Returns a blog by blog ID. |
Blog |
getBlog(String displayName)
Returns a blog by blog display name. |
int |
getBlogCount()
Returns the total number of blogs on this system. |
int |
getBlogCount(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. |
int |
getBlogPostCount(JiveContainer container)
Returns the number of blog posts associated with this container. |
int |
getBlogPostCount(JiveContainer container,
BlogPostResultFilter resultFilter)
Returns the number of blog posts in all blogs associated with the container based on the specified ResultFilter. |
int |
getBlogPostCount(TagSet tagSet)
Returns the number of blog posts associated with this tag set. |
int |
getBlogPostCount(TagSet tagSet,
BlogPostResultFilter resultFilter)
Returns the number of blog posts in all blogs associated with the tag set based on the specified ResultFilter. |
JiveIterator<BlogPost> |
getBlogPosts(BlogPostResultFilter resultFilter)
Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on the entire system. |
JiveIterator<BlogPost> |
getBlogPosts(JiveContainer container)
Returns the blog posts associated with this container. |
JiveIterator<BlogPost> |
getBlogPosts(JiveContainer container,
BlogPostResultFilter resultFilter)
Returns the blog posts in all blogs associated with the container based on the specified ResultFilter. |
JiveIterator<BlogPost> |
getBlogPosts(TagSet tagSet)
Returns the blog posts associated with this tag set based on the specified ResultFilter. |
JiveIterator<BlogPost> |
getBlogPosts(TagSet tagSet,
BlogPostResultFilter resultFilter)
Returns the blog posts associated with this container. |
JiveIterator<Blog> |
getBlogs(BlogResultFilter resultFilter)
Returns all the blogs on this system that match the criteria specified by the ResultFilter. |
JiveIterator<Blog> |
getBlogsByDisplayName(String query,
int startIndex,
int endIndex,
int numResults)
Returns all the blogs on this system whose display name is LIKE the given query. |
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. |
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. |
Map<String,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. |
Map<String,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 |
hasBlogMappings(Blog blog)
Indicates if the blog has legacy blog mappings supported prior to 2.1. |
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 |
mapBlogToContainer(JiveContainer container,
Blog blog)
Associates the specified Blog with a container. |
void |
mergeBlogs(Blog sourceBlog,
Blog destinationBlog)
Merges the content in the sourceBlog into the destinationBlog and deletes the
sourceBlog. |
void |
moveBlog(Blog blog,
JiveContainer destination)
Moves a blog from it's current container to a new container. |
void |
moveBlogPost(BlogPost post,
Blog blog)
Moves a blogpost from its current blog to another blog. |
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(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. |
void |
unmapContainerBlog(JiveContainer container,
Blog blog)
Disassociates the specified Blog from this containter. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| 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 administratorString getPingServices()
void setPingServices(String pingServices)
throws UnauthorizedException
pingServices - comma delimited list of available ping services for the system.
UnauthorizedException - if not a system administrator
Blog createBlog(JiveContainer container)
throws UnauthorizedException
addBlog(com.jivesoftware.community.Blog) method.
container - The container to which the blog will belong
UnauthorizedException - if not allowed to create a blog, not a system administrator or not a community
administrator
Blog createBlog(User user)
throws UnauthorizedException
user - to create the blog for
UnauthorizedException - if the currently authenticated user isn't authorized to create a user blog
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
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
void deleteUserBlogs(User user)
throws UnauthorizedException
user - the author of the blog content being deleted
UnauthorizedException - if the currently authenticated user isn't authorized to delete the given user's blogs
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(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.Blog getBlog(JiveContainer container)
container - the container having a blog
int getBlogCount()
int getBlogCount(BlogResultFilter resultFilter)
resultFilter - the besult filter holding the criteria to filter the blog count
JiveIterator<Blog> getBlogs(BlogResultFilter resultFilter)
resultFilter - a ResultFilter 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> getBlogsByDisplayName(String query,
int startIndex,
int endIndex,
int numResults)
query - a string to search blog display names by
JiveIterator<Blog> getRecentBlogs()
Map<String,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.Map<String,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,
UnauthorizedException
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()
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 blog posts
int getBlogPostCount(JiveContainer container)
BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
container - The container to get a blog post count for.
int getBlogPostCount(JiveContainer container,
BlogPostResultFilter resultFilter)
BlogPostResultFilter.createDefaultFilter()) only includes
blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
container - The container to get a blog post count for.resultFilter - a resultFilter to limit the query on.
int getBlogPostCount(TagSet tagSet)
BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
tagSet - The tagSet to get a blog post count for.
int getBlogPostCount(TagSet tagSet,
BlogPostResultFilter resultFilter)
BlogPostResultFilter.createDefaultFilter()) only includes blog posts
where status = BlogPost#STATUS_PUBLISH and publish date less than now().
tagSet - The tagSet to get a blog post count for.resultFilter - a resultFilter to limit the query on.
JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter resultFilter)
resultFilter - a BlogPostResultFilter object to perform filtering and sorting with.
JiveIterator<BlogPost> getBlogPosts(JiveContainer container)
BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
container - The container to get the blog posts for.
JiveIterator<BlogPost> getBlogPosts(JiveContainer container,
BlogPostResultFilter resultFilter)
BlogPostResultFilter.createDefaultFilter()) only includes
blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
container - The container to get a blog posts for.resultFilter - a resultFilter to limit the query on.
JiveIterator<BlogPost> getBlogPosts(TagSet tagSet)
BlogPostResultFilter.createDefaultFilter()) only includes
blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
tagSet - The tag set to get the blog posts for.
JiveIterator<BlogPost> getBlogPosts(TagSet tagSet,
BlogPostResultFilter resultFilter)
BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = BlogPost#STATUS_PUBLISH and publish date less than now().
tagSet - The tag set to get the blog posts for.resultFilter - a resultFilter to limit the query on.
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.
JiveIterator<BlogPost> getPopularBlogPosts()
void mapBlogToContainer(JiveContainer container,
Blog blog)
Blog with a container. All posts within the blog will be available for viewing
through the Blog.getBlogPosts(BlogPostResultFilter) method. Blogs are not logically contained by a
container the way threads and documents are. Instead, blogs are autonomous entities that can be associated with
one or more communities.
container - The container to map a blog too.blog - the Blog to associate with this container.
void unmapContainerBlog(JiveContainer container,
Blog blog)
Blog from this containter.
container - The container to dissociate a blog from.blog - the Blog to remove.boolean isAuthorized(long permissionType)
permissionType - permissionType a permission type.
Permissions
InterceptorManager getInterceptorManager()
throws UnauthorizedException
UnauthorizedException - if does not have admin permissions.
void moveBlog(Blog blog,
JiveContainer destination)
blog - The blog to move - the blog should already be assicoated
with a container, if not this method will fail.destination - The jive container to move the blog to. If the destination
container already has a blog, this method will fail.
void mergeBlogs(Blog sourceBlog,
Blog destinationBlog)
throws UnauthorizedException,
RejectedException
sourceBlog into the destinationBlog and deletes the
sourceBlog. WARNING: All attributes of the sourceBlog will be lost. This includes fields
such as name and descrition as well as attributes and concfiguration details such as permissions,
comment authentication, comment moderation, trackback authentication, trackback moderation, and ping services.
Any properties with matching keys are not copied to the destinationBlog
sourceBlog - the blog to have it's content mergeddestinationBlog - the blog that will receive the content
UnauthorizedException - if user does not have admin permission
RejectedException - if there is a problem copying trackbacks, posts, or other content from the sourceBlog to the
destinationBlog
void moveBlogPost(BlogPost post,
Blog blog)
throws RejectedException,
UnauthorizedException
post - The blogpost being moved.blog - The destination blog for the post being moved.
UnauthorizedException - if user does not have permission to manage either the source or destination blog
RejectedException - if there is a problem moving the postboolean hasBlogMappings(Blog blog)
blog - to find legacy mappings for
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||