|
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 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
JiveContentObject.Field, JiveContentObject.Status |
| Field Summary | |
|---|---|
static String |
POST_MODERATION_ENABLED
|
static JiveContentObject.Status |
STATUS_DEFAULT
The default public status for a blog post. |
static boolean |
TRACKBACKS_DEFAULT
The default trackback status for a blog post. |
| Method Summary | |
|---|---|
Blog |
getBlog()
Returns the blog this post belongs to. |
Document |
getBody()
Returns the post body. |
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. |
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. |
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. |
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. |
Map<String,String> |
getProperties()
Retrieve a map of all the extended properties for the post. |
Date |
getPublishDate()
Returns that date that this post should be published. |
RatingDelegator |
getRatingDelegator()
Retrieve a rating delegator to manage blog post ratings. |
JiveContentObject.Status |
getStatus()
Returns the status of this blog post which may be any one of the following: JiveContentObject.Status.DRAFT -- post has status of unpublished
JiveContentObject.Status.PUBLISHED -- post has status of published. |
String |
getSubject()
Returns the blog post subject. |
TagDelegator |
getTagDelegator()
Retrieve a tag delegator to manage blog post tags. |
TrackbackDelegator |
getTrackbackDelegator()
Retrieve a trackback delegator to manage blog post trackbacks. |
String |
getUnfilteredProperty(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 |
save(boolean fireModifiedEvent)
Saves the state of this BlogPost to the database |
void |
setBody(Document 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(Date creationDate)
Sets the creation date of this post. |
void |
setModificationDate(Date modificationDate)
Sets the date this post was last modified. |
void |
setPublishDate(Date publishDate)
Sets the publish date of this post. |
void |
setStatus(JiveContentObject.Status status)
Sets the publishing status of this blog post which may be any one of the following: JiveContentObject.Status.DRAFT -- post has status of unpublished
JiveContentObject.Status.PUBLISHED -- post has status of published. |
void |
setSubject(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 |
|---|
getContainerID, getContainerType, getIndexContent, getPlainBody, getPlainSubject, getUnfilteredSubject |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getObjectType |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getObjectType |
| Methods inherited from interface com.jivesoftware.community.ImageContentResource |
|---|
addImage, createImage, deleteImage, getImage, getImageCount, getImages |
| Field Detail |
|---|
static final JiveContentObject.Status STATUS_DEFAULT
static final boolean TRACKBACKS_DEFAULT
static final String POST_MODERATION_ENABLED
| Method Detail |
|---|
long getID()
getID in interface JiveObjectDate getCreationDate()
getCreationDate in interface JiveContentObject
void setCreationDate(Date creationDate)
throws UnauthorizedException
creationDate - the date this post was created.
UnauthorizedException - if not an administrator.Date getPublishDate()
void setPublishDate(Date publishDate)
throws UnauthorizedException
publishDate - the date this post should be published.
UnauthorizedException - if not allowed to edit this blog post.Date getModificationDate()
getModificationDate in interface JiveContentObject
void setModificationDate(Date modificationDate)
throws UnauthorizedException
modificationDate - the date this post was modified.
UnauthorizedException - if not an administrator.JiveContentObject.Status getStatus()
JiveContentObject.Status.DRAFT -- post has status of unpublished
JiveContentObject.Status.PUBLISHED -- post has status of published. JiveContentObject.Status.DRAFT
getStatus in interface JiveContentObject
void setStatus(JiveContentObject.Status status)
throws UnauthorizedException
JiveContentObject.Status.DRAFT -- post has status of unpublished
JiveContentObject.Status.PUBLISHED -- post has status of published.
status - the publish status of this blog post
UnauthorizedException - if not allowed to edit this blog post.Blog getBlog()
String getSubject()
getSubject in interface JiveContentObject
void setSubject(String subject)
throws UnauthorizedException
subject - the subject of this blog post.
UnauthorizedException - if not allowed to edit this blog post.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:
Document getBody()
getBody in interface JiveContentObject
void setBody(Document 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.CommentDelegator getCommentDelegator()
boolean isTrackbacksEnabled()
void setTrackbacksEnabled(boolean enable)
enable - true to enable trackbacks, false to disable trackbacksTrackbackDelegator getTrackbackDelegator()
TagDelegator getTagDelegator()
RatingDelegator getRatingDelegator()
Map<String,String> getProperties()
Values returned from the map are filtered through the filter system. To retrieve unfiltered property values use the
getUnfilteredProperty(String) method.
String getUnfilteredProperty(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
IllegalArgumentException - if the subject has already been used on this blog on the given publish date
void save(boolean fireModifiedEvent)
throws UnauthorizedException
fireModifiedEvent - true if a modified event should get fired after the blog is saved.
UnauthorizedException - If the user is not allowed to modify this blogpost
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 | |||||||||