Clearspace API (1.10.14) Web Services Client Javadocs

com.jivesoftware.community.webservices
Class BlogPost

java.lang.Object
  extended by com.jivesoftware.community.webservices.JiveObject
      extended by com.jivesoftware.community.webservices.BlogPost

public class BlogPost
extends JiveObject

A container for blog post data and for a hierarchy of blog comments.


Field Summary
static int STATUS_DEFAULT
          The default public status for a blog post.
static int STATUS_DRAFT
          Status value for blog posts that have been saved to the system but haven't been published and shouldn't be viewable to the public.
static int STATUS_PUBLISH
          Status value for blog posts that have been published to the system and should be viewable to the public.
static int STATUS_SCHEDULED
          Status value for blog posts that have been scheduled for publication in the future and shouldn't be viewable to the public.
static boolean TRACKBACKS_DEFAULT
          The default trackback status for a blog post.
 
Fields inherited from class com.jivesoftware.community.webservices.JiveObject
id, objectType
 
Constructor Summary
BlogPost()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getAttachmentCount()
          Returns the number of attachments this blog post has.
 long getBlogID()
          Returns the blog ID this post belongs to.
 java.lang.String getBody()
          Returns the post body.
 int getCommentCount()
          Returns the number of comments this blog post has.
 int getCommentStatus()
          Returns the comment status of this blog post which may be any one of the following: NONE -- no comments allowed OPEN -- comments are permitted CLOSED -- comments were permitted but are not allowed now Defaults to OPEN.
 java.util.Date getCreationDate()
          Returns the date that this post was created.
 int getImageCount()
          Returns the number of images this blog post has.
 java.util.Date getModificationDate()
          Returns the date that this post was last modified.
 long getNextPostID()
          Returns the next blogpost ID that has been published.
 java.lang.String getPermalink()
          Returns the permalink for this post, where the permalink is a composed only of unreserved characters: unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" as according to RFC 3986: http://www.ietf.org/rfc/rfc3986.txt Space characters and characters not in the list of unreserved characters are replaced with a hyphen character.
 java.lang.String getPlainBody()
          Returns the plain body.
 java.lang.String getPlainSubject()
          Returns the plain subject.
 long getPreviousPostID()
          Returns the previous blogpost ID that has been published.
 Property[] getProperties()
          Returns the properties associated with this blogpost.
 java.util.Date getPublishDate()
          Returns that date that this post should be published.
 int getStatus()
          Returns the status of this blog post which may be any one of the following: PENDING_APPROVAL -- post has status of unpublished PUBLISH -- post has status of published.
 java.lang.String getSubject()
          Returns the blog post subject.
 java.lang.String[] getTags()
          Returns the tags associated with this blogpost.
 java.lang.String getUnfilteredBody()
          Returns the unfiltered body.
 java.lang.String getUnfilteredSubject()
          Returns the unfiltered subject.
 User getUser()
          Returns the ID User that authored this blogpost.
 int hashCode()
           
 boolean isTrackbacksEnabled()
          Returns true if trackbacks are accepted on this blog post, false if not.
 void setAttachmentCount(int attachmentCount)
          Sets the number of attachments this blog post has.
 void setBlogID(long blogID)
          Sets the blog ID this post belongs to.
 void setBody(java.lang.String body)
          Sets the body of this post.
 void setCommentCount(int commentCount)
          Sets the number of comments this blog post has.
 void setCommentStatus(int commentStatus)
          Sets the comment status of this blog post.
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of this post.
 void setImageCount(int imageCount)
          Sets the number of images this blog post has.
 void setModificationDate(java.util.Date modificationDate)
          Sets the date this post was last modified.
 void setNextPostID(long nextPostID)
          Sets the next blogpost ID that has been published.
 void setPermalink(java.lang.String permalink)
          Sets the permalink for this blog post.
 void setPlainBody(java.lang.String plainBody)
          Sets the plain body.
 void setPlainSubject(java.lang.String plainSubject)
          Sets the plain subject.
 void setPreviousPostID(long previousPostID)
          Sets the previous blogpost ID that has been published.
 void setProperties(Property[] properties)
          Sets the properties associated with this blogpost.
 void setPublishDate(java.util.Date publishDate)
          Sets the publish date of this post.
 void setStatus(int status)
          Sets the publishing status of this blog post which may be any one of the following: PENDING_APPROVAL -- post has status of unpublished PUBLISH -- post has status of published.
 void setSubject(java.lang.String subject)
          Sets the subject of this blog post.
 void setTags(java.lang.String[] tags)
          Sets the tags associated with this blogpost.
 void setTrackbacksEnabled(boolean trackbacksEnabled)
          Enables and disables trackbacks for this blog post.
 void setUnfilteredBody(java.lang.String unfilteredBody)
          Sets the unfiltered body.
 void setUnfilteredSubject(java.lang.String unfilteredSubject)
          Sets the unfiltered subject.
 void setUser(User user)
          Sets the id of the user.
 java.lang.String toString()
           
 
Methods inherited from class com.jivesoftware.community.webservices.JiveObject
getID, getObjectType, setID, setObjectType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_DRAFT

public static final int STATUS_DRAFT
Status value for blog posts that have been saved to the system but haven't been published and shouldn't be viewable to the public.

See Also:
Constant Field Values

STATUS_PUBLISH

public static final int STATUS_PUBLISH
Status value for blog posts that have been published to the system and should be viewable to the public.

See Also:
Constant Field Values

STATUS_SCHEDULED

public static final int STATUS_SCHEDULED
Status value for blog posts that have been scheduled for publication in the future and shouldn't be viewable to the public.

See Also:
Constant Field Values

STATUS_DEFAULT

public static final int STATUS_DEFAULT
The default public status for a blog post.

See Also:
Constant Field Values

TRACKBACKS_DEFAULT

public static final boolean TRACKBACKS_DEFAULT
The default trackback status for a blog post.

See Also:
Constant Field Values
Constructor Detail

BlogPost

public BlogPost()
Method Detail

getCreationDate

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

Returns:
the date this post was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the creation date of this post. In most cases, the creation date will default to when the post 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 post was created.

getPublishDate

public java.util.Date getPublishDate()
Returns that date that this post should be published.

Returns:
the date this post should be published.

setPublishDate

public void setPublishDate(java.util.Date publishDate)
Sets the publish date of this post. In most cases, the publish date will be the date that the post was initially created. However, if the user chooses, he / she can provide a date in the future or in the past to allow for future publishing or post dating.

Parameters:
publishDate - the date this post should be published.

getModificationDate

public java.util.Date getModificationDate()
Returns the date that this post was last modified.

Returns:
the date this post was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the date this post was last modified. In most cases, last modifed will default to when the post 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 post was modified.

getStatus

public int getStatus()
Returns the status of this blog post which may be any one of the following: Defaults to PENDING_APPROVAL.

Returns:
status the publish status of this blog post

setStatus

public void setStatus(int status)
Sets the publishing status of this blog post which may be any one of the following:

Parameters:
status - the status of this blog post.

getBlogID

public long getBlogID()
Returns the blog ID this post belongs to.

Returns:
the blog ID this post belongs to.

setBlogID

public void setBlogID(long blogID)
Sets the blog ID this post belongs to.

Parameters:
blogID - the blog ID this post belongs to.

getUser

public User getUser()
Returns the ID User that authored this blogpost. If the blogpost was created anonymously, this method will return 0.

Returns:
the author of the blogpost.

setUser

public void setUser(User user)
Sets the id of the user.

Parameters:
user - the id of the user.

getSubject

public java.lang.String getSubject()
Returns the blog post subject. If system filters are active, the subject returned will be a filtered one. Because filters often provide security functionality, this method is the preferred way to get the subject of a blog post.

Returns:
the subject of this blog post.

setSubject

public void setSubject(java.lang.String subject)
Sets the subject of this blog post.

Parameters:
subject - the subject of this blog post.

getPermalink

public java.lang.String getPermalink()
Returns the permalink for this post, where the permalink is a composed only of unreserved characters:

unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

as according to RFC 3986: http://www.ietf.org/rfc/rfc3986.txt

Space characters and characters not in the list of unreserved characters are replaced with a hyphen character.

If an entry is composed entirely of spaces or characters not in the list of unreserved characters, the permalink will instead be the ID of the blog post from JiveObject.getID(). Examples:

NOTES:

Returns:
permalink the permalink for this post

setPermalink

public void setPermalink(java.lang.String permalink)
Sets the permalink for this blog post.

Parameters:
permalink - the permalink for this

getBody

public java.lang.String getBody()
Returns the post body. If post filters are active, the body returned will be a filtered one. Because filters often provide security functionality such as stripping out HTML and Javascript, this method is the preferred way to get the body of a post.

Returns:
the body of this blog post.

setBody

public void setBody(java.lang.String body)
Sets the body of this post. If body is larger than message.maxBodySize the body will be truncated.

Parameters:
body - the body of this post.

getPreviousPostID

public long getPreviousPostID()
Returns the previous blogpost ID that has been published.

Returns:
blogpost the previous blogpost ID in this blog

setPreviousPostID

public void setPreviousPostID(long previousPostID)
Sets the previous blogpost ID that has been published.

Parameters:
previousPostID - that has been published.

getNextPostID

public long getNextPostID()
Returns the next blogpost ID that has been published.

Returns:
blogpost the next blogpost in this blog.

setNextPostID

public void setNextPostID(long nextPostID)
Sets the next blogpost ID that has been published.

Parameters:
nextPostID - the next blogpost ID that has been published.

getCommentStatus

public int getCommentStatus()
Returns the comment status of this blog post which may be any one of the following: Defaults to OPEN.

Returns:
status the comment status of this blog post

setCommentStatus

public void setCommentStatus(int commentStatus)
Sets the comment status of this blog post.

Parameters:
commentStatus - the comment status of this blog post.

isTrackbacksEnabled

public boolean isTrackbacksEnabled()
Returns true if trackbacks are accepted on this blog post, false if not. Default is true.

Returns:
true if trackbacks are accepted on this blog post, false if not.

setTrackbacksEnabled

public void setTrackbacksEnabled(boolean trackbacksEnabled)
Enables and disables trackbacks for this blog post. Default is true.

Parameters:
trackbacksEnabled - true to enable trackbacks, false to disable trackbacks

getAttachmentCount

public int getAttachmentCount()
Returns the number of attachments this blog post has.

Returns:
the number of attachments this blog post has.

setAttachmentCount

public void setAttachmentCount(int attachmentCount)
Sets the number of attachments this blog post has.

Parameters:
attachmentCount - the number of attachments this blog post has.

getCommentCount

public int getCommentCount()
Returns the number of comments this blog post has.

Returns:
the number of comments this blog post has.

setCommentCount

public void setCommentCount(int commentCount)
Sets the number of comments this blog post has.

Parameters:
commentCount - the number of comments this blog post has.

getImageCount

public int getImageCount()
Returns the number of images this blog post has.

Returns:
the number of images this blog post has.

setImageCount

public void setImageCount(int imageCount)
Sets the number of images this blog post has.

Parameters:
imageCount - the number of images this blog post has.

getUnfilteredSubject

public java.lang.String getUnfilteredSubject()
Returns the unfiltered subject.

Returns:
the unfiltered subject.

setUnfilteredSubject

public void setUnfilteredSubject(java.lang.String unfilteredSubject)
Sets the unfiltered subject.

Parameters:
unfilteredSubject - the unfiltered subject.

getProperties

public Property[] getProperties()
Returns the properties associated with this blogpost.

Returns:
the properties associated with this blogpost.

setProperties

public void setProperties(Property[] properties)
Sets the properties associated with this blogpost.

Parameters:
properties - the properties associated with this blogpost.

getTags

public java.lang.String[] getTags()
Returns the tags associated with this blogpost.

Returns:
the tags associated with this blogpost.

setTags

public void setTags(java.lang.String[] tags)
Sets the tags associated with this blogpost.

Parameters:
tags - the tags associated with this blogpost.

getUnfilteredBody

public java.lang.String getUnfilteredBody()
Returns the unfiltered body.

Returns:
the unfiltered body.

setUnfilteredBody

public void setUnfilteredBody(java.lang.String unfilteredBody)
Sets the unfiltered body.

Parameters:
unfilteredBody - the unfiltered body.

getPlainSubject

public java.lang.String getPlainSubject()
Returns the plain subject.

Returns:
the plain subject.

setPlainSubject

public void setPlainSubject(java.lang.String plainSubject)
Sets the plain subject.

Parameters:
plainSubject - the plain subject.

getPlainBody

public java.lang.String getPlainBody()
Returns the plain body.

Returns:
the plain body.

setPlainBody

public void setPlainBody(java.lang.String plainBody)
Sets the plain body.

Parameters:
plainBody - the plain blody.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class JiveObject

toString

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

Clearspace Project Page

Copyright © 1999-2007 Jive Software.