|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlogPost
A container for blog post data and for a hierarchy of blog comments.
There are two options for navigating through the comments on a post.
CommentTreeWalker -- provides a
hierarchical view of the comments on a blog post.
| 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 interface com.jivesoftware.community.JiveContentObject |
|---|
BODY_FIELD, SUBJECT_FIELD |
| Method Summary | |
|---|---|
Blog |
getBlog()
Returns the blog this post belongs to. |
java.lang.String |
getBody()
Returns the post body. |
com.jivesoftware.community.CommentDelegator |
getCommentDelegator()
Retrieve a comment manager to manage blog post comments. |
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. |
long |
getID()
Returns the unique ID of this post, or -1 if the post hasn't been added to the database yet. |
java.util.Date |
getModificationDate()
Returns the date that this post was last modified. |
BlogPost |
getNextPost()
Returns the next blogpost that has been published or null if this is the most recent post. |
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. |
BlogPost |
getPreviousPost()
Returns the previous blogpost that has been published or null if this is the first post. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Retrieve a map of all the extended properties for the post. |
java.util.Date |
getPublishDate()
Returns that date that this post should be published. |
com.jivesoftware.community.RatingDelegator |
getRatingDelegator()
Retrieve a rating delegator to manage blog post ratings. |
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. |
com.jivesoftware.community.TagDelegator |
getTagDelegator()
Retrieve a tag delegator to manage blog post tags. |
TrackbackManager |
getTrackbackManager()
Retrieve a trackback manager to manage blog post trackbacks. |
java.lang.String |
getUnfilteredProperty(java.lang.String name)
Returns an extended property of the blog, bypassing any filters. |
User |
getUser()
Returns the User that authored this post. |
int |
getViewCount()
Returns the number of times this blog post has been viewed. |
boolean |
isTrackbacksEnabled()
Returns true if trackbacks are accepted on this blog post, false if not. |
void |
save()
Saves the state of this BlogPost to the database |
void |
setBody(java.lang.String body)
Sets the body of this post. |
void |
setCommentStatus(int status)
Sets 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
|
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of this post. |
void |
setModificationDate(java.util.Date modificationDate)
Sets the date this post was last modified. |
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 |
setTrackbacksEnabled(boolean enable)
Enables and disables trackbacks for this blog post. |
| Methods inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
getIndexContent, getPlainBody, getPlainSubject, getUnfilteredBody, getUnfilteredSubject |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getObjectType |
| Methods inherited from interface com.jivesoftware.community.AttachmentContentResource |
|---|
createAttachment, deleteAttachment, getAttachment, getAttachmentCount, getAttachments |
| Methods inherited from interface com.jivesoftware.community.ImageContentResource |
|---|
addImage, createImage, deleteImage, getImage, getImageCount, getImages |
| Field Detail |
|---|
static final int STATUS_DRAFT
static final int STATUS_PUBLISH
static final int STATUS_SCHEDULED
static final int STATUS_DEFAULT
static final boolean TRACKBACKS_DEFAULT
| Method Detail |
|---|
long getID()
getID in interface JiveObjectjava.util.Date getCreationDate()
getCreationDate in interface JiveContentObject
void setCreationDate(java.util.Date creationDate)
throws UnauthorizedException
creationDate - the date this post was created.
UnauthorizedException - if not an administrator.java.util.Date getPublishDate()
void setPublishDate(java.util.Date publishDate)
throws UnauthorizedException
publishDate - the date this post should be published.
UnauthorizedException - if not allowed to edit this blog post.java.util.Date getModificationDate()
getModificationDate in interface JiveContentObject
void setModificationDate(java.util.Date modificationDate)
throws UnauthorizedException
modificationDate - the date this post was modified.
UnauthorizedException - if not an administrator.int getStatus()
PENDING_APPROVAL -- post has status of unpublished
PUBLISH -- post has status of published.
PENDING_APPROVAL.
void setStatus(int status)
throws UnauthorizedException
PENDING_APPROVAL -- post has status of unpublished
PUBLISH -- post has status of published.
status - the publish status of this blog post
UnauthorizedException - if not allowed to edit this blog post.Blog getBlog()
java.lang.String getSubject()
getSubject in interface JiveContentObject
void setSubject(java.lang.String subject)
throws UnauthorizedException
subject - the subject of this blog post.
UnauthorizedException - if not allowed to edit this blog post.java.lang.String getPermalink()
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 getID().
Examples:
java.lang.String getBody()
getBody in interface JiveContentObject
void setBody(java.lang.String body)
throws UnauthorizedException
body - the body of this post.
UnauthorizedException - if not allowed to edit this blog post.User getUser()
getUser in interface JiveContentObject
BlogPost getPreviousPost()
throws BlogPostNotFoundException
BlogPostNotFoundException - if the previous blog post could not be loaded
BlogPost getNextPost()
throws BlogPostNotFoundException
BlogPostNotFoundException - if the next blog post could not be loadedint getCommentStatus()
NONE -- no comments allowed
OPEN -- comments are permitted
CLOSED -- comments were permitted but are not allowed now
OPEN.
void setCommentStatus(int status)
throws UnauthorizedException
NONE -- no comments allowed
OPEN -- comments are permitted
CLOSED -- comments were permitted but are not allowed now
status - the comment status of this blog post
UnauthorizedException - if not allowed to edit this blog post.com.jivesoftware.community.CommentDelegator getCommentDelegator()
boolean isTrackbacksEnabled()
void setTrackbacksEnabled(boolean enable)
enable - true to enable trackbacks, false to disable trackbacksTrackbackManager getTrackbackManager()
com.jivesoftware.community.TagDelegator getTagDelegator()
com.jivesoftware.community.RatingDelegator getRatingDelegator()
java.util.Map<java.lang.String,java.lang.String> getProperties()
Values returned from the map are filtered through the filter system. To retrieve unfiltered
property values use the getUnfilteredProperty(String) method.
java.lang.String getUnfilteredProperty(java.lang.String name)
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.
name - the name of the property to get.
void save()
throws UnauthorizedException
UnauthorizedException - If the user is not allowed to modify this blogpost
java.lang.IllegalArgumentException - if the subject has already been used on this blog
on the given publish dateint getViewCount()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||