Clearspace API (2.5.18) Core Javadocs

com.jivesoftware.community
Interface Blog

All Superinterfaces:
JiveContainer, JiveObject

public interface Blog
extends JiveContainer

A container for a list of blog postings by a user or group of users. Every blog is associated with one or more containers (including possibly user containers) and contains a name and a short description.

Each blog can have an arbitrary number of extended properties, which allow extra data about the blog to be stored.


Field Summary
static int COMMENT_AUTH_DEFAULT
          The default comment authentication value.
static int COMMENT_AUTH_OPTIONAL
          Value for comment authentication which indicates that users need not register with the system nor do they have to provide an email address as part of a comment.
static int COMMENT_AUTH_OPTIONAL_WITH_EMAIL
          Value for comment authentication which indicates that users must either register and authenticate with the system or provide an email address as part of an anonymous comment before submitting a comment.
static int COMMENT_AUTH_REQUIRED
          Value for comment authentication which indicates that users must register and authenticate with the system before adding a comment.
static int SORT_ACTIVITY
           
static int SORT_BLOGID
           
static int SORT_DISPLAYNAME
           
static int SORT_NAME
           
 
Method Summary
 void addBlogPost(BlogPost post)
          Adds a blogpost to the database.
 void addUser(User user)
          Gives a user permission to post to this blog.
 void addUsers(List<User> users)
          Gives a list of users permissions to post to this blog.
 BlogPost createBlogPost(User user)
          Creates a new blog post.
 void deleteBlogPost(BlogPost post)
          Deletes a blogpost.
 BlogPost getBlogPost(long blogPostID)
          Returns a blogpost by blogpost ID.
 BlogPost getBlogPost(String permalink, int year, int month, int day)
          Returns a blog post for a given permalink and year/month/day combination, where the permalink is the subject turned into a string value suitable to be a directory name.
 int getBlogPostCount()
          Returns the number of blog posts on this blog, by default only includes blog posts where status = JiveContentObject.Status.PUBLISHED and publish date less than now().
 int getBlogPostCount(BlogPostResultFilter resultFilter)
          Returns the number of blog posts on this blog The default blog post result filter (BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = JiveContentObject.Status.PUBLISHED and publish date less than now().
 JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter resultFilter)
          Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on a specific blog.
 Comment getComment(long commentID)
          Returns a comment by comment ID.
 int getCommentAuthenticationStrategy()
          Returns the comment authentication strategy of this blog which may be any one of the following: COMMENT_AUTH_REQUIRED -- must register and login to comment COMMENT_AUTH_OPTIONAL_WITH_EMAIL -- must either register and login or provide an email address in the comment form.
 int getCommentCount()
          Returns the total number of comments on this blog.
 int getCommentCount(FeedbackResultFilter resultFilter)
          Returns the total number of comments on this blog that match the criteria specified by the ResultFilter.
 JiveIterator<Comment> getComments(FeedbackResultFilter resultFilter)
          Returns all the comments on this blog that match the criteria specified by the ResultFilter.
 Set<User> getContributors()
          Returns an alpha-sorted set of all users who have contributed to the blog.
 Date getCreationDate()
          Returns the date that this blog was created.
 String getDescription()
          Returns the description of the blog.
 String getDisplayName()
          Gets the display name of a blog.
 BlogPost getFirstPost()
          Returns the first blog post on this blog.
 long getID()
          Returns the unique ID of the blog, or -1 if the blog hasn't been added to the database yet.
 JiveContainer getJiveContainer()
          Returns the parent container to which this blog belongs.
 BlogPost getLatestPost()
          Returns the most recently created and published blog post on this blog.
 Date getModificationDate()
          Returns the date that the blog name, display name or description was last modified.
 String getName()
          Returns the name of the blog.
 Permissions getPermissions(AuthToken authToken)
          Deprecated. 
 String getPingServices()
          Returns a line break separated list of services that the user has chosen to ping.
 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.
 Map<String,Integer> getPopularTags()
          Returns the 20 most popular tags for a given blog 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 blog.
 Map<String,String> getProperties()
          Retrieve a map of all the extended properties for the blog.
 JiveIterator<BlogPost> getRecentBlogPosts()
          Returns (at most) the ten most recent blog posts on this blog.
 JiveIterator<Comment> getRecentComments()
          Returns (at most) the ten most recent comments on this blog.
 Map<String,Integer> getTags()
          Returns all tags for a given blog 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 blog.
 Map<String,Integer> getTags(BlogTagResultFilter resultFilter)
          Returns all tags for a given blog 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 blog filtered by the BlogTagResultFilter.
 Trackback getTrackback(long trackbackID)
          Returns a trackback by trackback ID.
 int getTrackbackCount()
          Returns the total number of trackbacks on this blog.
 int getTrackbackCount(FeedbackResultFilter resultFilter)
          Returns the total number of trackbacks on this blog that match the criteria specified by the ResultFilter.
 JiveIterator<Trackback> getTrackbacks(FeedbackResultFilter resultFilter)
          Returns all the trackbacks on this blog that match the criteria specified by the ResultFilter.
 String getUnfilteredProperty(String name)
          Returns an extended property of the blog, bypassing any filters.
 User getUser()
          If this blog is a "user" blog, this method will return the User to whom this blog belongs, otherwise an IllegalStateException will be thrown.
 int getUserCount()
          Returns the number of users associated with this blog.
 Iterable<User> getUsers()
          Return all the users given permission to post to this blog.
 boolean isAuthorized(long permissionType)
          Deprecated. 
 boolean isCommentModerationEnabled()
          Returns true if comment moderation is enabled for this blog, false if not.
 boolean isCommentNotificationEnabled()
          Returns true if comment notification is enabled for this blog, false if not.
 boolean isFeedEnabled()
          Returns true if feeds are enabled for this blog, false if not.
 boolean isFeedFullContent()
          Returns true if the full blog post should be published in feeds, false to instead include an excerpt of the blog post.
 boolean isOverridePing()
          Returns true if the blog has been configured to override the system settings, false to use the system blog ping settings.
 boolean isSystemBlog()
          Returns true if this blog is a system blog (formerly known as group blogs).
 boolean isTrackbackModerationEnabled()
          Returns true if trackback moderation is enabled for this blog, false if not.
 boolean isTrackbackNotificationEnabled()
          Returns true if trackback notification is enabled for this blog, false if not.
 boolean isUserBlog()
          Returns true if this blog is a user's personal blog.
 void removeUser(User user)
          Removes a user from having permission to post to this blog.
 void removeUser(User user, boolean deletePosts)
          Removes a user from having permission to post to this blog and optionally deletes posts by this user.
 void save()
          Saves the state of this Blog to the database
 void setCommentAuthenticationStrategy(int strategy)
          Set the comment authentication strategy of this blog which may be any one of the following: COMMENT_AUTH_REQUIRED -- must register and login to comment COMMENT_AUTH_OPTIONAL_WITH_EMAIL -- must either register and login or provide an email address in the comment form.
 void setCommentModerationEnabled(boolean enable)
          Enables and disables comment moderation for this blog.
 void setCommentNotificationEnabled(boolean enable)
          Enables and disables comment notification for this blog.
 void setCreationDate(Date creationDate)
          Sets the creation date of this blog.
 void setDescription(String description)
          Sets the description of the blog, max length of 255 characters.
 void setDisplayName(String name)
          Sets the display name of the blog that is used as the URI.
 void setFeedEnabled(boolean enable)
          Enables and disables feeds for this blog.
 void setFeedFullContent(boolean enable)
          Enables or disables the publishing of the full blog post in feeds.
 void setJiveContainer(JiveContainer container)
          Adds or moves the parent container of the blog.
 void setModificationDate(Date modificationDate)
          Sets the date this blog was last modified.
 void setName(String name)
          Sets the name of a blog.
 void setOverridePing(boolean override)
          Enables or disables the blog to override the ping settings in the system.
 void setPingServices(String services)
          A line break separated list of services that the user has chosen to ping.
 void setTrackbackModerationEnabled(boolean enable)
          Enables and disables trackback moderation for this blog.
 void setTrackbackNotificationEnabled(boolean enable)
          Enables and disables trackback notification for this blog.
 
Methods inherited from interface com.jivesoftware.community.JiveContainer
getAvailableContentTypes, getContentTypes, getInterceptorManager, getPermissionsManager, getTaggableTypes, setContentTypes
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getObjectType
 

Field Detail

COMMENT_AUTH_DEFAULT

static final int COMMENT_AUTH_DEFAULT
The default comment authentication value.

See Also:
Constant Field Values

COMMENT_AUTH_REQUIRED

static final int COMMENT_AUTH_REQUIRED
Value for comment authentication which indicates that users must register and authenticate with the system before adding a comment. Anonymous comments with or without an email address, are not allowed. This is the most restrictive of the three comment authentication options.

See Also:
Constant Field Values

COMMENT_AUTH_OPTIONAL_WITH_EMAIL

static final int COMMENT_AUTH_OPTIONAL_WITH_EMAIL
Value for comment authentication which indicates that users must either register and authenticate with the system or provide an email address as part of an anonymous comment before submitting a comment.

See Also:
Constant Field Values

COMMENT_AUTH_OPTIONAL

static final int COMMENT_AUTH_OPTIONAL
Value for comment authentication which indicates that users need not register with the system nor do they have to provide an email address as part of a comment. This is the least restrictive of the three comment authentication options.

See Also:
Constant Field Values

SORT_BLOGID

static final int SORT_BLOGID
See Also:
Constant Field Values

SORT_DISPLAYNAME

static final int SORT_DISPLAYNAME
See Also:
Constant Field Values

SORT_NAME

static final int SORT_NAME
See Also:
Constant Field Values

SORT_ACTIVITY

static final int SORT_ACTIVITY
See Also:
Constant Field Values
Method Detail

getID

long getID()
Returns the unique ID of the blog, or -1 if the blog hasn't been added to the database yet.

Specified by:
getID in interface JiveObject
Returns:
the ID of the blog.

getName

String getName()
Returns the name of the blog.

Specified by:
getName in interface JiveContainer
Returns:
the name of the blog.

setName

void setName(String name)
             throws UnauthorizedException
Sets the name of a blog.

Specified by:
setName in interface JiveContainer
Parameters:
name - the name of the blog.
Throws:
UnauthorizedException - if user is not associated with this blog and does not have ADMIN permission.

getDisplayName

String getDisplayName()
Gets the display name of a blog.

Specified by:
getDisplayName in interface JiveContainer
Returns:
the display name of the blog

setDisplayName

void setDisplayName(String name)
                    throws UnauthorizedException
Sets the display name of the blog that is used as the URI. The display name will be used as part of the URI and is necessary both for users who want to name their blog something different than their username and also for system blogs, where the username wouldn't be adequate by itself. Example:

http://jivesoftware.org/community/blogs/openfireteam

This method will throw an IllegalArgumentException if

Use the BlogManager.getBlog(String) method to find out if a blog with the new name already exists and BlogUtils.isValidDisplayName(String) to test a string for non alphanumeric characters.

Specified by:
setDisplayName in interface JiveContainer
Parameters:
name - the display name
Throws:
UnauthorizedException - if user is not associated with this blog and does not have ADMIN permission.
IllegalArgumentException - if the name is already associated with another blog, or if the name is the same as the username of another user, or if the name contains non-alphanumeric characters.

getDescription

String getDescription()
Returns the description of the blog.

Specified by:
getDescription in interface JiveContainer
Returns:
the description of the blog.

setDescription

void setDescription(String description)
                    throws UnauthorizedException
Sets the description of the blog, max length of 255 characters.

Specified by:
setDescription in interface JiveContainer
Parameters:
description - the description of the blog.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.
IllegalArgumentException - if description is null or greater than 255 characters in length.

getCreationDate

Date getCreationDate()
Returns the date that this blog was created.

Specified by:
getCreationDate in interface JiveContainer
Returns:
the date this blog was created.

setCreationDate

void setCreationDate(Date creationDate)
                     throws UnauthorizedException
Sets the creation date of this blog. In most cases, the creation date will default to when the blog was entered into the system. However, the creation date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Specified by:
setCreationDate in interface JiveContainer
Parameters:
creationDate - the date this blog was created.
Throws:
UnauthorizedException - if not an administrator.

getModificationDate

Date getModificationDate()
Returns the date that the blog name, display name or description was last modified.

Specified by:
getModificationDate in interface JiveContainer
Returns:
the date that the blog name, display name or description was last modified.

setModificationDate

void setModificationDate(Date modificationDate)
                         throws UnauthorizedException
Sets the date this blog was last modified. In most cases, last modifed will default to when the blog data was last changed. However, the last modified date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Specified by:
setModificationDate in interface JiveContainer
Parameters:
modificationDate - the date this blog name, display name or description was modified.
Throws:
UnauthorizedException - if not an administrator.

addUser

void addUser(User user)
             throws UnauthorizedException
Gives a user permission to post to this blog. If the user is already an author on this blog, this method will no-op.

Parameters:
user - the user to add post permission for
Throws:
UnauthorizedException - if does not have permission to add user

addUsers

void addUsers(List<User> users)
              throws UnauthorizedException
Gives a list of users permissions to post to this blog. If the user is already an author, this method will no-op.

Parameters:
users - a list of users permissions to post to this blog.
Throws:
UnauthorizedException - if does not have permissions to add users

removeUser

void removeUser(User user)
                throws UnauthorizedException
Removes a user from having permission to post to this blog.

Removing a user also deletes all of the given users' posts in this blog. The search index and other resources that reference the posts will also be updated appropriately.

Note: because at least one user must be associated with a blog, an IllegalArgumentException will thrown if user is the only user. To delete an entire blog, use the BlogManager.deleteBlog(Blog) method.

Parameters:
user - the user to remove from the blog.
Throws:
IllegalArgumentException - if user is the only user
UnauthorizedException - if does not have permission to remove users.

removeUser

void removeUser(User user,
                boolean deletePosts)
                throws UnauthorizedException
Removes a user from having permission to post to this blog and optionally deletes posts by this user. Passing in true to this method is equivalent to calling the removeUser(User user) method since it will delete all posts by this user in this blog. If deletePosts is false, then posts will not be deleted but will continue to exist as having been posted by the user but the user will no longer have permission to post to this blog.

Note: because at least one user must be associated with a blog, an IllegalArgumentException will thrown if user is the only user. To delete an entire blog, use the BlogManager.deleteBlog(Blog) method.

Parameters:
user - the user to remove.
deletePosts - true if posts by this user should be deleted, false if posts should be associated with the primary user.
Throws:
IllegalArgumentException - if user is the only user.
UnauthorizedException - if does not have permission to remove users.

getUser

User getUser()
             throws IllegalStateException
If this blog is a "user" blog, this method will return the User to whom this blog belongs, otherwise an IllegalStateException will be thrown.

Returns:
the user to whom this blog belongs.
Throws:
IllegalStateException - if this blog does not belong to an individual user but has multiple contributors.
See Also:
isUserBlog()

getUsers

Iterable<User> getUsers()
Return all the users given permission to post to this blog.

Returns:
all users given permission to post to this blog.

getContributors

Set<User> getContributors()
Returns an alpha-sorted set of all users who have contributed to the blog. This may include users who are no-longer permitted to blog but whose content remains.

Returns:
an alpha-sorted set of all users who have contributed to the blog.

getUserCount

int getUserCount()
Returns the number of users associated with this blog.

Returns:
the number of users associated with this blog.

getProperties

Map<String,String> getProperties()
Retrieve a map of all the extended properties for the blog. Each blog can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface. The map is alterable if the user is authorized to modify the blog, however only a mapping of key -> value is allowed. Null keys and values are not allowed.

Values returned from the map are filtered through the filter system. To retrieve unfiltered property values use the getUnfilteredProperty(String) method.

Specified by:
getProperties in interface JiveContainer
Returns:
a map of blog extended properties.

getUnfilteredProperty

String getUnfilteredProperty(String name)
Returns an extended property of the blog, bypassing any filters. Each blog can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface.

Because properties are not filtered before being returned, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.

Parameters:
name - the name of the property to get.
Returns:
the value of the property.

save

void save()
          throws UnauthorizedException
Saves the state of this Blog to the database

Throws:
UnauthorizedException - If the user is not allowed to modify this blog

createBlogPost

BlogPost createBlogPost(User user)
                        throws UnauthorizedException
Creates a new blog post. After an blog post is created and the appropriate values are set, it must be added to the database by calling the addBlogPost(com.jivesoftware.community.BlogPost) method.

Parameters:
user - the user adding the blog post
Returns:
a new blogpost.
Throws:
UnauthorizedException - if not allowed to create a blogpost.

addBlogPost

void addBlogPost(BlogPost post)
                 throws RejectedException,
                        UnauthorizedException
Adds a blogpost to the database. This method must be called after the blogpost is created and all appropriate values on it have been set. After this method is called, the blogpost will be immediately viewable to others.

Parameters:
post - the blogpost to add to the database.
Throws:
RejectedException - if one of the installed interceptors prevents the blog post from being posted.
UnauthorizedException - if not allowed to create a blogpost.
IllegalStateException - if the blogpost has already been added.
IllegalArgumentException - if the blogpost subject has already been used on the given publish date or if the permalink is not specified.

deleteBlogPost

void deleteBlogPost(BlogPost post)
                    throws UnauthorizedException
Deletes a blogpost.

Parameters:
post - the blogpost to delete.
Throws:
UnauthorizedException - if not allowed to delete the blogpost.

getFirstPost

BlogPost getFirstPost()
Returns the first blog post on this blog.

Returns:
the first blog post on this blog.

getLatestPost

BlogPost getLatestPost()
Returns the most recently created and published blog post on this blog. This information could also be determined using a ThreadResultFilter, but this method offers a simpler, more optimized way to access the data.

Returns:
the most recently created blog post on this blog.

getBlogPost

BlogPost getBlogPost(long blogPostID)
                     throws BlogPostNotFoundException,
                            UnauthorizedException
Returns a blogpost by blogpost ID.

Parameters:
blogPostID - the ID of the blogpost to return.
Returns:
the blogpost.
Throws:
BlogPostNotFoundException - if the blogpost could not be loaded, does not exist or if the blog post does exist but hasn't been published and the user doesn't have appropriate permissions to view unpublished material.
UnauthorizedException - if not allowed to get the blogpost.

getBlogPost

BlogPost getBlogPost(String permalink,
                     int year,
                     int month,
                     int day)
                     throws BlogPostNotFoundException,
                            UnauthorizedException
Returns a blog post for a given permalink and year/month/day combination, where the permalink is the subject turned into a string value suitable to be a directory name. The year/month/day parameters are required because it's possible for a user to create a post with the same permalink stub multiple times as long as it's not on the same day.

Parameters:
permalink - the permalink to return the blog post for
year - the year the blog post was published
month - the month the blog post was published
day - the day the blog post was published
Returns:
blogpost the blog post corresponding to the given permalink
Throws:
BlogPostNotFoundException - if the blogpost could not be loaded, does not exist or if the blog post does exist but hasn't been published and the user doesn't have appropriate permissions to view unpublished material.
UnauthorizedException - if not allowed to get the blogpost.
See Also:
BlogPost.getPermalink()

getBlogPostCount

int getBlogPostCount()
Returns the number of blog posts on this blog, by default only includes blog posts where status = JiveContentObject.Status.PUBLISHED and publish date less than now().

Returns:
the number of blog posts on this blog.

getBlogPostCount

int getBlogPostCount(BlogPostResultFilter resultFilter)
Returns the number of blog posts on this blog The default blog post result filter (BlogPostResultFilter.createDefaultFilter()) only includes blog posts where status = JiveContentObject.Status.PUBLISHED and publish date less than now().

Parameters:
resultFilter - the filter to use to filter blog posts
Returns:
the number of blog posts on this blog that match the criteria specified by the BlogPostResultFilter

getBlogPosts

JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter resultFilter)
Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on a specific blog.

Parameters:
resultFilter - a BlogPostResultFilter object to perform filtering and sorting with.
Returns:
all the blog posts that match the ResultFilter.

getRecentBlogPosts

JiveIterator<BlogPost> getRecentBlogPosts()
Returns (at most) the ten most recent blog posts on this blog.

Returns:
(atmost) the ten most recent blog posts on this blog.

getPopularTags

Map<String,Integer> getPopularTags()
Returns the 20 most popular tags for a given blog 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 blog.

Returns:
the 20 most popular tags for a given blog 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 blog.

getTags

Map<String,Integer> getTags()
Returns all tags for a given blog 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 blog.

Returns:
all tags for a given blog 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 blog.

getTags

Map<String,Integer> getTags(BlogTagResultFilter resultFilter)
Returns all tags for a given blog 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 blog filtered by the BlogTagResultFilter.

Parameters:
resultFilter - the filter to use to restrict tag results
Returns:
all tags for a given blog 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 blog filtered by the BlogTagResultFilter.

getComment

Comment getComment(long commentID)
                   throws CommentNotFoundException,
                          UnauthorizedException
Returns a comment by comment ID.

Parameters:
commentID - the ID of the comment to return.
Returns:
the comment.
Throws:
CommentNotFoundException - if the comment could not be loaded or does not exist
UnauthorizedException - if the user doesn't have appropriate permissions to edit the comment.

getCommentCount

int getCommentCount()
Returns the total number of comments on this blog.

Returns:
the total number of comments on this blog.

getCommentCount

int getCommentCount(FeedbackResultFilter resultFilter)
Returns the total number of comments on this blog that match the criteria specified by the ResultFilter.

Parameters:
resultFilter - the filter to use to filter comments
Returns:
the total number of comments on this blog that match the criteria specified by the ResultFilter.

getComments

JiveIterator<Comment> getComments(FeedbackResultFilter resultFilter)
Returns all the comments on this blog that match the criteria specified by the ResultFilter.

Parameters:
resultFilter - a ResultFilter object to perform filtering and sorting with.
Returns:
all the comments on this post that match the ResultFilter.

getRecentComments

JiveIterator<Comment> getRecentComments()
Returns (at most) the ten most recent comments on this blog.

Returns:
(atmost) the ten most recent comments on this blog.

getTrackback

Trackback getTrackback(long trackbackID)
                       throws TrackbackNotFoundException,
                              UnauthorizedException
Returns a trackback by trackback ID.

Parameters:
trackbackID - the ID of the trackback to return.
Returns:
the trackback.
Throws:
TrackbackNotFoundException - if the trackback could not be loaded or does not exist
UnauthorizedException - if the user doesn't have appropriate permissions to get the trackback.

getTrackbackCount

int getTrackbackCount()
Returns the total number of trackbacks on this blog.

Returns:
the total number of trackbacks on this blog.

getTrackbackCount

int getTrackbackCount(FeedbackResultFilter resultFilter)
Returns the total number of trackbacks on this blog that match the criteria specified by the ResultFilter.

Parameters:
resultFilter - the filter to use to filter trackbacks
Returns:
the total number of trackbacks on this blog that match the criteria specified by the ResultFilter.

getTrackbacks

JiveIterator<Trackback> getTrackbacks(FeedbackResultFilter resultFilter)
Returns all the trackbacks on this blog that match the criteria specified by the ResultFilter.

Parameters:
resultFilter - a ResultFilter object to perform filtering and sorting with.
Returns:
all the trackbacks on this post that match the ResultFilter.

isTrackbackModerationEnabled

boolean isTrackbackModerationEnabled()
Returns true if trackback moderation is enabled for this blog, false if not. Default is false.

Returns:
true if trackback moderation is enabled on this blog, false if not.

setTrackbackModerationEnabled

void setTrackbackModerationEnabled(boolean enable)
                                   throws UnauthorizedException
Enables and disables trackback moderation for this blog. Default is false.

Parameters:
enable - true to enable trackback moderation, false to disable trackback moderation.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

isCommentModerationEnabled

boolean isCommentModerationEnabled()
Returns true if comment moderation is enabled for this blog, false if not. Default is false.

Returns:
true if comment moderation is enabled on this blog, false if not.

setCommentModerationEnabled

void setCommentModerationEnabled(boolean enable)
                                 throws UnauthorizedException
Enables and disables comment moderation for this blog. Default is false.

Parameters:
enable - true to enable comment moderation, false to disable comment moderation.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

getCommentAuthenticationStrategy

int getCommentAuthenticationStrategy()
Returns the comment authentication strategy of this blog which may be any one of the following:

Defaults to COMMENT_AUTH_REQUIRED.

Returns:
strategy the comment authentication strategy for this blog

setCommentAuthenticationStrategy

void setCommentAuthenticationStrategy(int strategy)
                                      throws UnauthorizedException
Set the comment authentication strategy of this blog which may be any one of the following:

Parameters:
strategy - the comment authentication strategy for this blog
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

isCommentNotificationEnabled

boolean isCommentNotificationEnabled()
Returns true if comment notification is enabled for this blog, false if not. Default is true.

Returns:
true if comment notification is enabled on this blog, false if not.

setCommentNotificationEnabled

void setCommentNotificationEnabled(boolean enable)
                                   throws UnauthorizedException
Enables and disables comment notification for this blog. Default is true.

Parameters:
enable - true to enable comment notification, false to disable comment notification.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

isTrackbackNotificationEnabled

boolean isTrackbackNotificationEnabled()
Returns true if trackback notification is enabled for this blog, false if not. Default is true.

Returns:
true if trackback notification is enabled on this blog, false if not.

setTrackbackNotificationEnabled

void setTrackbackNotificationEnabled(boolean enable)
                                     throws UnauthorizedException
Enables and disables trackback notification for this blog. Default is true.

Parameters:
enable - true to enable trackback notification, false to disable trackback notification.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

setFeedEnabled

void setFeedEnabled(boolean enable)
                    throws UnauthorizedException
Enables and disables feeds for this blog. Default is true

Parameters:
enable - true to enable feeds on this blog, false to disable feeds.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

isFeedEnabled

boolean isFeedEnabled()
Returns true if feeds are enabled for this blog, false if not. Default is true.

Returns:
true if feeds are enabled on this blog, false if not.

setFeedFullContent

void setFeedFullContent(boolean enable)
                        throws UnauthorizedException
Enables or disables the publishing of the full blog post in feeds. Default is true.

Parameters:
enable - true to enable full content on feeds in this blog, false to show an excerpt.
Throws:
UnauthorizedException - if user not associated with this blog and does not have ADMIN permission.

isFeedFullContent

boolean isFeedFullContent()
Returns true if the full blog post should be published in feeds, false to instead include an excerpt of the blog post. Default is true.

Returns:
true if the full blog post should be published, false to include an excerpt.

isOverridePing

boolean isOverridePing()
Returns true if the blog has been configured to override the system settings, false to use the system blog ping settings. Default is false.

Returns:
true if the blog has been configured to override the system settings, false to use the system blog ping settings.

setOverridePing

void setOverridePing(boolean override)
Enables or disables the blog to override the ping settings in the system. Default is false.

Parameters:
override - true to override the ping settings in the system, false to use the system settings.
Throws:
UnauthorizedException - if user not associated with this blog, does not have ADMIN permission, or the system has not been configured to allow users to override ping settings.

getPingServices

String getPingServices()
Returns a line break separated list of services that the user has chosen to ping.

Returns:
a line break separated list of services that the user has chosen to ping

setPingServices

void setPingServices(String services)
A line break separated list of services that the user has chosen to ping.

Parameters:
services - a line break separated list of services that the user has chosen to ping
Throws:
UnauthorizedException - if user not associated with this blog, does not have ADMIN permission, or the system has not been configured to allow users to override ping settings.

isSystemBlog

boolean isSystemBlog()
Returns true if this blog is a system blog (formerly known as group blogs).

Returns:
true if the blog is a system blog

isUserBlog

boolean isUserBlog()
Returns true if this blog is a user's personal blog.

Returns:
true if the blog is a user's personal blog

getPopularBlogPosts

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. The algorithm is as follows:

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.

Returns:
an Iterable of the most popular blog posts.

getPermissions

@Deprecated
Permissions getPermissions(AuthToken authToken)
Deprecated. 

Returns the permissions for the blog that correspond to the passed-in AuthToken. This method is not generally useful to skin writers. Instead, the isAuthorized(int) method should be used for permission checking. This method is deprecated in favor of the entitlement provider API.

Specified by:
getPermissions in interface JiveContainer
Parameters:
authToken - the auth token to lookup permissions for.
Returns:
the permissions for the blog that correspond to the passed-in AuthToken.

isAuthorized

@Deprecated
boolean isAuthorized(long permissionType)
Deprecated. 

Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the Permissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments. This method is deprecated in favor of the entitlement provider API.

Specified by:
isAuthorized in interface JiveContainer
Parameters:
permissionType - permissionType a permission type.
Returns:
true if the handle on the object has the specified permission.
See Also:
Permissions

getJiveContainer

JiveContainer getJiveContainer()
Returns the parent container to which this blog belongs.

Returns:
the parent container to which this blog belongs

setJiveContainer

void setJiveContainer(JiveContainer container)
Adds or moves the parent container of the blog.

Parameters:
container -

Clearspace Project Page

Copyright © 1999-2007 Jive Software.