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_REFERER
Request paramter and header name for Referrer Url.
|
static String |
PROP_SPAM
The property name for the spam flag.
|
static String |
PROP_USE_REFERRER_URL
The property name for use referrer as the @link getFriendlyUrl() value.
|
static String |
SOCO_SELECTOR
GET Selector.
|
DEFAULT_SELECTOR, INDEX_SELECTOR, QUERY_SELECTOR, TRANSLATE_SELECTOR| Modifier and Type | Method and Description |
|---|---|
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.
|
Calendar |
getPublishDate()
Returns the scheduled publish date.
|
String |
getReferrerUrl() |
String |
getSourceComponentId() |
List<Comment.Tag> |
getTags() |
String |
getTranslationAttribution() |
String |
getTranslationDescription() |
String |
getTranslationDisplay() |
String |
getTranslationTitle() |
boolean |
getUseFlagReasons() |
SocialComponent |
getVotes() |
boolean |
isApproved()
Checks whether this comment is approved (in case comments are moderated).
|
boolean |
isClosed() |
boolean |
isDraft()
Checks if is draft.
|
boolean |
isFlaggedByUser() |
boolean |
isScheduled()
Checks if comment is scheduled to be published later.
|
boolean |
isTopLevel() |
boolean |
isUserModerator() |
boolean |
isVisible() |
getItems, getTotalSize, setPagination, setSortedOrdergetAsMap, getFriendlyUrl, getId, getParentComponent, getProperties, getResource, getResourceType, getSourceComponent, getUrl, toJSONStringstatic 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
static final String PROP_USE_REFERRER_URL
static final String PROP_REFERER
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()
boolean isScheduled()
boolean isDraft()
Calendar getPublishDate()
null if not found.List<Comment.Tag> getTags()
SocialComponent getVotes()
String getCurrentUserFlagText()
boolean getCanReply()
Comment.ModeratorStatus getModeratorStatus()
Comment.ModeratorActions getModeratorActions()
Comment.ModeratorActionsT getConfiguration()
PageInfo getPageInfo()
boolean getUseFlagReasons()
boolean isFlaggedByUser()
String getSourceComponentId()
String getTranslationTitle()
String getTranslationDescription()
String getTranslationAttribution()
String getTranslationDisplay()
String getReferrerUrl()
PROP_USE_REFERRER_URL configuration is set to true."Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"