|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Comment
A comment provides a way for users to annotate or give feedback on a JiveContentObject. Administrators
control who is allowed to post comments and can also specify whether a moderator has to approve comments before they
are visible to other users.
JiveContentObject.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
JiveContentObject.Field, JiveContentObject.Status |
| Method Summary | |
|---|---|
Document |
getBody()
Returns the comment body. |
com.jivesoftware.community.CommentContentResource |
getCommentContentResource()
Returns the parent CommentContentResource of the comment. |
Date |
getCreationDate()
Returns the date that the comment was created. |
String |
getEmail()
Returns the email of the person that authored this comment. |
String |
getIPAddress()
Returns the IP address of the person that authored this comment. |
JiveContainer |
getJiveContainer()
Returns the container object of the document. |
Date |
getModificationDate()
Returns the date that the comment was last modified. |
String |
getName()
Returns the name of the person that authored this comment. |
Map<String,String> |
getProperties()
Retrieve a map of all the extended properties for the comment. |
String |
getUnfilteredProperty(String name)
Returns an extended property of the comment, bypassing any filters. |
String |
getURL()
Returns the URL of the person that authored this comment. |
User |
getUser()
Returns the user that authored the comment. |
boolean |
isAnonymous()
Returns true if the comment was posted anonymously. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
boolean |
isModerated()
Returns true if the commend is moderated, false otherwise. |
void |
setBody(Document body)
Sets the comment body. |
void |
setCreationDate(Date creationDate)
Sets the creation date of the comment. |
void |
setEmail(String email)
Set the email address of the person who authored this comment. |
void |
setIPAddress(String ipaddress)
Set the IP address of the person who authored this comment. |
void |
setModerated(boolean moderated)
Sets whether the comment is moderated or not. |
void |
setModificationDate(Date modificationDate)
Sets the date the comment was last modified. |
void |
setName(String name)
Set the name of the person who authored this comment. |
void |
setStatus(JiveContentObject.Status status)
Sets the status of this comment |
void |
setURL(String url)
Set the URL / homepage of the person who authored this comment. |
| Methods inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
getContainerID, getContainerType, getIndexContent, getPlainBody, getPlainSubject, getStatus, getSubject, getUnfilteredSubject |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getID, getObjectType |
| Methods inherited from interface com.jivesoftware.community.ImageContentResource |
|---|
addImage, createImage, deleteImage, getImage, getImageCount, getImages |
| Method Detail |
|---|
com.jivesoftware.community.CommentContentResource getCommentContentResource()
CommentContentResource of the comment.
CommentContentResource which contains the comment.User getUser()
getUser in interface JiveContentObjectString getName()
void setName(String name)
throws UnauthorizedException
name - the name of the person who authored this comment.
UnauthorizedException - if user is not allowed to edit the comment.String getEmail()
void setEmail(String email)
throws UnauthorizedException
email - the email address of the person who authored this comment.
UnauthorizedException - if user is not allowed to edit the comment.String getURL()
void setURL(String url)
throws UnauthorizedException
url - the URL / homepage of the person who authored this comment.
UnauthorizedException - if user is not allowed to edit the comment.String getIPAddress()
void setIPAddress(String ipaddress)
throws UnauthorizedException
ipaddress - the IP address of the person who authored this comment.
UnauthorizedException - if user is not allowed to edit the comment.Document getBody()
getBody in interface JiveContentObject
void setBody(Document body)
throws UnauthorizedException
body - the body of the comment.
UnauthorizedException - if user is not allowed to edit the comment.boolean isAnonymous()
Date getCreationDate()
getCreationDate in interface JiveContentObject
void setCreationDate(Date creationDate)
throws UnauthorizedException
creationDate - the date the comment was created.
UnauthorizedException - if user does not have Permissions.COMMUNITY_ADMIN or Permissions.SYSTEM_ADMIN
permissions.Date getModificationDate()
getModificationDate in interface JiveContentObject
void setModificationDate(Date modificationDate)
throws UnauthorizedException
modificationDate - the date the comment was last modified.
UnauthorizedException - if user does not have Permissions.COMMUNITY_ADMIN or Permissions.SYSTEM_ADMIN
permissions.boolean isModerated()
If the moderation value is less than the community's minimum, then the comment will not be displayed by default.
void setModerated(boolean moderated)
throws UnauthorizedException
When calling this method results in a comment become unmoderated, then the actions listed above will all be executed. Any change in moderation also results in the modified date of the comment being updated.
Only administrators and moderators can call this method.
The authToken of the user must be passed into this method as a parameter for moderation auditing purposes.
moderated - true if the comment is to be moderated, false otherwise.
UnauthorizedException - if does not have Permissions.COMMUNITY_ADMIN, Permissions.SYSTEM_ADMIN or
Permissions.MODERATOR permissions.WatchManagerboolean isAuthorized(long permissionType)
A list of possible permissions can be found in the
Permissions and the Permissions classes.
Certain methods of this class are restricted to certain permissions as specified in the method comments.
permissionType - a permission type from the Permissions or the Permissions class.
Permissions,
PermissionsMap<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.
JiveContainer getJiveContainer()
void setStatus(JiveContentObject.Status status)
throws UnauthorizedException
status - the status of the comment.
UnauthorizedException - if the caller does not have ADMIN, MODERATE_MESSAGES or MODERATOR permissions.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||