Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Class WSBlog

java.lang.Object
  extended by com.jivesoftware.community.webservices.WSJiveObject
      extended by com.jivesoftware.community.webservices.WSBlog

public class WSBlog
extends WSJiveObject

A container for a list of blog postings by a user or group of users. Every blog is associated with one or more users 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
           
 
Fields inherited from class com.jivesoftware.community.webservices.WSJiveObject
id, objectType
 
Constructor Summary
WSBlog()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Long[] getAllBlogPostIDs()
          Returns all the blog post IDs for this blog.
 int getBlogPostCount()
          Returns the number of blog posts on this blog, by default only includes blog posts where status = WSBlogPost.STATUS_PUBLISH and publish date less than now().
 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.
 java.util.Date getCreationDate()
          Returns the date that this blog was created.
 java.lang.String getDescription()
          Returns the description of the blog.
 java.lang.String getDisplayName()
          Gets the display name of a blog.
 long getFirstPostID()
          Returns the first blog post ID on this blog.
 long getLastPostID()
          Returns the last blog post ID on this blog.
 java.util.Date getModificationDate()
          Returns the date that the blog name, display name or description was last modified.
 java.lang.String getName()
          Returns the name of the blog.
 java.lang.String getPingServices()
          Returns a line break separated list of services that the user has chosen to ping.
 WSTagCount[] 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.
 WSProperty[] getProperties()
          Returns the properties associated with this blog.
 java.lang.Long[] getRecentBlogPostIDs()
          Returns (at most) the ten most recent blog postsIDs on this blog.
 java.lang.Long[] getRecentCommentIDs()
          Returns (at most) the ten most recent comment IDs on this blog.
 WSTagCount[] 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.
 int getTrackbackCount()
          Returns the total number of trackbacks on this blog.
 int getUserCount()
          Returns the number of users associated with this blog.
 java.lang.Long[] getUserIDs()
          Return all the user IDs given permission to post to this blog.
 int hashCode()
           
 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 isContainerBlog()
          Returns true if this blog is a container 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 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.
 void setAllBlogPostIDs(java.lang.Long[] allBlogPostIDs)
          Sets all the blog post IDs for this blog.
 void setBlogPostCount(int blogPostCount)
          Sets the number of blog posts on this blog.
 void setCommentAuthenticationStrategy(int commentAuthenticationStrategy)
          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 setCommentCount(int commentCount)
          Sets the total number of comments on this blog.
 void setCommentModerationEnabled(boolean commentModerationEnabled)
          Enables and disables comment moderation for this blog.
 void setCommentNotificationEnabled(boolean commentNotificationEnabled)
          Enables and disables comment notification for this blog.
 void setContainerBlog(boolean containerBlog)
          Enables and disables the container aspects of this blog.
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of this blog.
 void setDescription(java.lang.String description)
          Sets the description of the blog, max length of 255 characters.
 void setDisplayName(java.lang.String displayName)
          Sets the display name of the blog that is used as the URI.
 void setFeedEnabled(boolean feedEnabled)
          Enables and disables feeds for this blog.
 void setFeedFullContent(boolean feedFullContent)
          Enables or disables the publishing of the full blog post in feeds.
 void setFirstPostID(long firstPostID)
          Sets the first blog post ID on this blog.
 void setLastPostID(long lastPostID)
          Sets the last blog post ID on this blog.
 void setModificationDate(java.util.Date modificationDate)
          Sets the date this blog was last modified.
 void setName(java.lang.String name)
          Sets the name of a blog.
 void setOverridePing(boolean overridePing)
          Enables or disables the blog to override the ping settings in the system.
 void setPingServices(java.lang.String pingServices)
          A line break separated list of services that the user has chosen to ping.
 void setPopularTags(WSTagCount[] popularTags)
          Sets the 20 most popular tags for a given blog.
 void setProperties(WSProperty[] properties)
          Set the properties associated with this blog.
 void setRecentBlogPostIDs(java.lang.Long[] recentBlogPostIDs)
          Sets the the most recent blog post IDs on this blog
 void setRecentCommentIDs(java.lang.Long[] recentCommentIDs)
          Sets the most recent comment IDs on this blog.
 void setTags(WSTagCount[] tags)
          Sets the tags for a given blog.
 void setTrackbackCount(int trackbackCount)
          Sets the total number of trackbacks on this blog.
 void setTrackbackModerationEnabled(boolean trackbackModerationEnabled)
          Enables and disables trackback moderation for this blog.
 void setTrackbackNotificationEnabled(boolean trackbackNotificationEnabled)
          Enables and disables trackback notification for this blog.
 void setUserCount(int userCount)
          Sets the number of users associated with this blog.
 void setUserIDs(java.lang.Long[] userIDs)
          Sets the user IDs given permission to post to this blog.
 java.lang.String toString()
           
 
Methods inherited from class com.jivesoftware.community.webservices.WSJiveObject
getID, getObjectType, setID, setObjectType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COMMENT_AUTH_DEFAULT

public static final int COMMENT_AUTH_DEFAULT
The default comment authentication value.

See Also:
Constant Field Values

COMMENT_AUTH_REQUIRED

public 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

public 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

public 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

public static final int SORT_BLOGID
See Also:
Constant Field Values

SORT_DISPLAYNAME

public static final int SORT_DISPLAYNAME
See Also:
Constant Field Values

SORT_NAME

public static final int SORT_NAME
See Also:
Constant Field Values

SORT_ACTIVITY

public static final int SORT_ACTIVITY
See Also:
Constant Field Values
Constructor Detail

WSBlog

public WSBlog()
Method Detail

getName

public java.lang.String getName()
Returns the name of the blog.

Returns:
the name of the blog.

setName

public void setName(java.lang.String name)
Sets the name of a blog.

Parameters:
name - the name of the blog.

getDisplayName

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

Returns:
the display name of the blog

setDisplayName

public void setDisplayName(java.lang.String displayName)
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 group 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 com.jivesoftware.community.BlogManager#getBlog(String) method to find out if a blog with the new name already exists and com.jivesoftware.community.util.BlogUtils#isValidDisplayName(String) to test a string for non alphanumeric characters.

Parameters:
displayName - the display name

getCreationDate

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

Returns:
the date this blog was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
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.

Parameters:
creationDate - the date this blog was created.

getModificationDate

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

Returns:
the date that the blog name, display name or description was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
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.

Parameters:
modificationDate - the date this blog name, display name or description was modified.

getUserIDs

public java.lang.Long[] getUserIDs()
Return all the user IDs given permission to post to this blog.

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

setUserIDs

public void setUserIDs(java.lang.Long[] userIDs)
Sets the user IDs given permission to post to this blog.

Parameters:
userIDs - the user IDs given permission to post to this blog.

getUserCount

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

Returns:
the number of users associated with this blog.

setUserCount

public void setUserCount(int userCount)
Sets the number of users associated with this blog.

Parameters:
userCount - the number of users associated with this blog.

getProperties

public WSProperty[] getProperties()
Returns the properties associated with this blog.

Returns:
the properties associated with this blog.

setProperties

public void setProperties(WSProperty[] properties)
Set the properties associated with this blog.

Parameters:
properties - the properties associated with this blog.

getFirstPostID

public long getFirstPostID()
Returns the first blog post ID on this blog.

Returns:
the first blog post ID on this blog.

setFirstPostID

public void setFirstPostID(long firstPostID)
Sets the first blog post ID on this blog.

Parameters:
firstPostID - the first blog post ID on this blog.

getLastPostID

public long getLastPostID()
Returns the last blog post ID on this blog.

Returns:
the last blog post ID on this blog.

setLastPostID

public void setLastPostID(long lastPostID)
Sets the last blog post ID on this blog.

Parameters:
lastPostID - the last blog post ID on this blog.

getBlogPostCount

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

Returns:
the number of blog posts on this blog.

setBlogPostCount

public void setBlogPostCount(int blogPostCount)
Sets the number of blog posts on this blog.

Parameters:
blogPostCount - the number of blog posts on this blog.

getRecentBlogPostIDs

public java.lang.Long[] getRecentBlogPostIDs()
Returns (at most) the ten most recent blog postsIDs on this blog.

Returns:
(at most) the ten most recent blog postsIDs on this blog.

setRecentBlogPostIDs

public void setRecentBlogPostIDs(java.lang.Long[] recentBlogPostIDs)
Sets the the most recent blog post IDs on this blog

Parameters:
recentBlogPostIDs - the the most recent blog post IDs on this blog

getPopularTags

public WSTagCount[] 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.

setPopularTags

public void setPopularTags(WSTagCount[] popularTags)
Sets the 20 most popular tags for a given blog.

Parameters:
popularTags - the 20 most popular tags for a given blog.

getTags

public WSTagCount[] 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.

setTags

public void setTags(WSTagCount[] tags)
Sets the tags for a given blog.

Parameters:
tags - the tags for a given blog.

getCommentCount

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

Returns:
the total number of comments on this blog.

setCommentCount

public void setCommentCount(int commentCount)
Sets the total number of comments on this blog.

Parameters:
commentCount - the total number of comments on this blog.

getTrackbackCount

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

Returns:
the total number of trackbacks on this blog.

setTrackbackCount

public void setTrackbackCount(int trackbackCount)
Sets the total number of trackbacks on this blog.

Parameters:
trackbackCount - the total number of trackbacks on this blog.

getRecentCommentIDs

public java.lang.Long[] getRecentCommentIDs()
Returns (at most) the ten most recent comment IDs on this blog.

Returns:
(at most) the ten most recent comment IDs on this blog.

setRecentCommentIDs

public void setRecentCommentIDs(java.lang.Long[] recentCommentIDs)
Sets the most recent comment IDs on this blog.

Parameters:
recentCommentIDs - the most recent comment IDs on this blog.

isTrackbackModerationEnabled

public 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

public void setTrackbackModerationEnabled(boolean trackbackModerationEnabled)
Enables and disables trackback moderation for this blog. Default is false.

Parameters:
trackbackModerationEnabled - true to enable trackback moderation, false to disable trackback moderation.

isCommentModerationEnabled

public 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

public void setCommentModerationEnabled(boolean commentModerationEnabled)
Enables and disables comment moderation for this blog. Default is false.

Parameters:
commentModerationEnabled - true to enable comment moderation, false to disable comment moderation.

getCommentAuthenticationStrategy

public 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

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

Parameters:
commentAuthenticationStrategy - the comment authentication strategy for this blog

isCommentNotificationEnabled

public 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

public void setCommentNotificationEnabled(boolean commentNotificationEnabled)
Enables and disables comment notification for this blog. Default is true.

Parameters:
commentNotificationEnabled - true to enable comment notification, false to disable comment notification.

isTrackbackNotificationEnabled

public 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

public void setTrackbackNotificationEnabled(boolean trackbackNotificationEnabled)
Enables and disables trackback notification for this blog. Default is true.

Parameters:
trackbackNotificationEnabled - true to enable trackback notification, false to disable trackback notification.

isFeedEnabled

public 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.

setFeedEnabled

public void setFeedEnabled(boolean feedEnabled)
Enables and disables feeds for this blog. Default is true

Parameters:
feedEnabled - true to enable feeds on this blog, false to disable feeds.

isFeedFullContent

public 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.

setFeedFullContent

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

Parameters:
feedFullContent - true to enable full content on feeds in this blog, false to show an excerpt.

isOverridePing

public 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

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

Parameters:
overridePing - true to override the ping settings in the system, false to use the system settings.

getPingServices

public java.lang.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

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

Parameters:
pingServices - a line break separated list of services that the user has chosen to ping

isContainerBlog

public boolean isContainerBlog()
Returns true if this blog is a container blog, false if not. Default is false.

Returns:
true if this blog is a container blog, false if not.

setContainerBlog

public void setContainerBlog(boolean containerBlog)
Enables and disables the container aspects of this blog. Default is false.

Parameters:
containerBlog - true to enable container blog functionality, false to disable container blog functionality.

getDescription

public java.lang.String getDescription()
Returns the description of the blog.

Returns:
the description of the blog.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the blog, max length of 255 characters.

Parameters:
description - the description of the blog.
Throws:
java.lang.IllegalArgumentException - if description is null or greater than 255 characters in length.

getAllBlogPostIDs

public java.lang.Long[] getAllBlogPostIDs()
Returns all the blog post IDs for this blog.

Returns:
all the blog post IDs for this blog.

setAllBlogPostIDs

public void setAllBlogPostIDs(java.lang.Long[] allBlogPostIDs)
Sets all the blog post IDs for this blog.

Parameters:
allBlogPostIDs - all the blog post IDs for this blog.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class WSJiveObject

hashCode

public int hashCode()
Overrides:
hashCode in class WSJiveObject

toString

public java.lang.String toString()
Overrides:
toString in class WSJiveObject

Clearspace Project Page

Copyright © 1999-2007 Jive Software.