public interface Comment<T extends CommentCollectionConfiguration> extends SocialCollectionComponent
A Comment
represents a comment created by a user (author) on a specific target (e.g. a page, asset or
any node for that matter). The comments are contained within a CommentCollection
(see #getParent()
.
A comment simply provides a comment text or "message" (see getMessage()
and access to various meta data,
such as creation date, who created it, etc.
Comments support attachments, i.e. files that are stored as part of a comment, e.g. a preview image if the comment is used to annotate an image.
Comments can also support reply to a comment
Modifier and Type | Interface and Description |
---|---|
static interface |
Comment.ModeratorActions |
static interface |
Comment.ModeratorStatus |
static interface |
Comment.Tag |
Modifier and Type | Field and Description |
---|---|
static String |
COMMENT_RESOURCETYPE
The comment resourcetype.
|
static String |
COMMENTCOLLECTION_RESOURCETYPE
The commentcollection resourcetype.
|
static String |
JSON_EXTENSION
JSON extension.
|
static String |
NODE_TYPE
The comment node type.
|
static String |
PROP_APPROVED
The property name for the approval status.
|
static String |
PROP_SPAM
The property name for the spam flag.
|
static String |
SOCO_SELECTOR
GET Selector.
|
Modifier and Type | Method and Description |
---|---|
T |
createConfiguration(Resource resource,
CommentSystem cs)
Create configuration for the specified resource
|
Attachment |
getAttachment(String name)
Retrieve an attachment of this comment by its file name.
|
Map<String,Attachment> |
getAttachments()
Retrieves a map, an entry of which represents a file-name/attachment pair.
|
User |
getAuthor()
Returns the author's identifying name that represents the author of this comment.
|
boolean |
getCanDelete() |
boolean |
getCanEdit() |
boolean |
getCanReply() |
boolean |
getCanTranslate()
Check if the UGC language is the same as the Page language.
|
T |
getConfiguration()
Get the configuration for this comment
|
Calendar |
getCreated()
The time stamp this comment was created.
|
String |
getCurrentUserFlagText() |
List<FlagReason> |
getFlagReasons() |
String |
getMessage()
Retrieves the message of this comment.
|
Comment.ModeratorActions |
getModeratorActions() |
Comment.ModeratorStatus |
getModeratorStatus()
This only available if the current user is a moderator
|
PageInfo |
getPageInfo()
Gets information about the pages for this collection.
|
String |
getParentId()
Get this comment parent id.
|
List<Comment.Tag> |
getTags() |
boolean |
getUseFlagReasons() |
SocialComponent |
getVotes() |
boolean |
isApproved()
Checks whether this comment is approved (in case comments are moderated).
|
boolean |
isClosed() |
boolean |
isFlaggedByUser() |
boolean |
isTopLevel() |
boolean |
isUserModerator() |
boolean |
isVisible() |
getItems, getTotalSize, setPagination, setSortedOrder
getAsMap, getId, getProperties, getResource, getResourceType, getUrl, toJSONString
static final String JSON_EXTENSION
static final String SOCO_SELECTOR
static final String COMMENT_RESOURCETYPE
static final String COMMENTCOLLECTION_RESOURCETYPE
static final String NODE_TYPE
static final String PROP_APPROVED
static final String PROP_SPAM
Attachment getAttachment(String name)
name
- The file name of the attachment.ResourceID
representing the attachment, or null
if no attachment with the given
name exists.User getAuthor()
Map<String,Attachment> getAttachments()
Map
representing the available attachments, or an empty map if no attachments are present.Calendar getCreated()
Calendar
representing creation time.String getMessage()
String
representing the message.boolean isTopLevel()
boolean isApproved()
true
if comment is approved or unmoderated, false
otherwiseboolean getCanEdit()
true
if the Edit action button should be displayedboolean getCanDelete()
true
if the Delete action button should be displayedString getParentId()
boolean getCanTranslate()
true
if the ugc language is detected and enabled and different than the page language.boolean isUserModerator()
List<FlagReason> getFlagReasons()
boolean isVisible()
boolean isClosed()
List<Comment.Tag> getTags()
SocialComponent getVotes()
String getCurrentUserFlagText()
boolean getCanReply()
Comment.ModeratorStatus getModeratorStatus()
Comment.ModeratorActions getModeratorActions()
Comment.ModeratorActions
T getConfiguration()
T createConfiguration(Resource resource, CommentSystem cs)
resource
- the target resourcecs
- The CommentSystem
of the commentPageInfo getPageInfo()
boolean getUseFlagReasons()
boolean isFlaggedByUser()
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"