public class Comment extends ContentEntityObject implements HasLinkWikiMarkup, Spaced, ContentConvertible, Contained<ContentEntityObject>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE |
static String |
FOOTER
The comment will be found in the page footer (i.e.
|
static String |
INLINE
The comment will be found in the page content (aka.
|
static String |
INLINE_PROP
ContentProperty key for the property that indicates whether or not
the comment is an inline comment. |
static String |
MARKER_REF_PROP
ContentProperty key for the reference to the selection's markers in storage format |
static String |
ORIGINAL_SELECTION_PROP
ContentProperty key for original selection text of the inline comment |
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCEINITIAL_VERSION| Constructor and Description |
|---|
Comment() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Comment child) |
Object |
clone() |
void |
convertToHistoricalVersion()
Remove all data from the object that does not need to be saved by historical versions.
|
boolean |
equals(Object obj) |
List<Comment> |
getChildren() |
@Nullable ContentEntityObject |
getContainer() |
ContentEntityObject |
getContentEntityObject() |
ContentId |
getContentId()
Returns the
ContentId for this Comment. |
ContentType |
getContentTypeObject() |
int |
getDepth() |
Set<String> |
getDescendantAuthors() |
int |
getDescendantsCount() |
String |
getDisplayTitle()
Returns the display title.
|
String |
getLinkWikiMarkup() |
String |
getNameForComparison()
Since the ContentEntityObject falls back on ordering by creation date, comments
should always end up being sorted in their order of posting, below the page they
were created in.
|
Comment |
getParent() |
Space |
getSpace() |
String |
getSpaceKey()
Deprecated.
|
CommentStatus |
getStatus()
Get the status of comment
|
Date |
getThreadChangedDate() |
String |
getType()
An easy name for the type of this content: makes it easy for
things like the #contentLink macro to work out what to draw.
|
String |
getUrlPath() |
int |
hashCode() |
boolean |
isInlineComment() |
void |
removeChild(Comment child) |
void |
reparentChildren(Comment newParent) |
void |
setChildren(List<Comment> children) |
void |
setContainer(ContentEntityObject container) |
void |
setInlineComment(boolean isInlineComment)
Set if the comment is inline
|
void |
setParent(Comment parent) |
void |
setStatus(CommentStatus status)
Set status for comment
|
boolean |
shouldConvertToContent() |
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, applyChildVersioningPolicy, applyChildVersioningPolicy, compareTo, ensureAttachmentBelongsToContent, getAttachmentManager, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getAttachmentUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getCollaborativeEditingUuid, getComments, getContainerContent, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getDefaultBodyType, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrackbackLinks, getTrashDate, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isIndexable, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, removeReferralLink, removeTrackbackLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setReferralLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setTitle, setTrackbackLinks, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, toString, trash, trash, trashDependents, wasCreatedByaddLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellingsgetConfluenceRevision, getLatestVersion, getVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersiongetCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierNamegetCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDatefinalize, getClass, notify, notifyAll, wait, wait, waitgetSelectorgetIdgetId, isPersistentpublic static final String CONTENT_TYPE
public static final String INLINE_PROP
ContentProperty key for the property that indicates whether or not
the comment is an inline comment.public static final String MARKER_REF_PROP
ContentProperty key for the reference to the selection's markers in storage formatpublic static final String ORIGINAL_SELECTION_PROP
ContentProperty key for original selection text of the inline commentpublic static final String INLINE
public static final String FOOTER
public ContentEntityObject getContentEntityObject()
public @Nullable ContentEntityObject getContainer()
getContainer in interface Contained<ContentEntityObject>public void setContainer(ContentEntityObject container)
public String getDisplayTitle()
ContentEntityObjectgetDisplayTitle in interface AddressablegetDisplayTitle in class ContentEntityObjectpublic String getUrlPath()
getUrlPath in interface AddressablegetUrlPath in class ContentEntityObjectpublic String getType()
ContentEntityObjectThis is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
getType in interface ContentTypeAwaregetType in class ContentEntityObjectpublic String getNameForComparison()
getNameForComparison in class ContentEntityObject@Deprecated public String getSpaceKey()
public Comment getParent()
public void setParent(Comment parent)
public void addChild(Comment child)
public int getDescendantsCount()
public int getDepth()
public Date getThreadChangedDate()
public void reparentChildren(Comment newParent)
public void convertToHistoricalVersion()
Versioned
When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.
convertToHistoricalVersion in interface VersionedconvertToHistoricalVersion in class ContentEntityObjectpublic void removeChild(Comment child)
public Object clone()
clone in class ContentEntityObjectpublic String getLinkWikiMarkup()
getLinkWikiMarkup in interface HasLinkWikiMarkuppublic ContentType getContentTypeObject()
getContentTypeObject in interface ContentConvertiblepublic ContentId getContentId()
ContentId for this Comment.getContentId in interface ContentConvertiblegetContentId in class ContentEntityObjectpublic boolean shouldConvertToContent()
shouldConvertToContent in interface ContentConvertiblepublic boolean isInlineComment()
public void setInlineComment(boolean isInlineComment)
isInlineComment - public CommentStatus getStatus()
public void setStatus(CommentStatus status)
status - CommentStatuspublic boolean equals(Object obj)
equals in class ContentEntityObjectpublic int hashCode()
hashCode in class ContentEntityObjectCopyright © 2003–2021 Atlassian. All rights reserved.