public class Comment extends ContentEntityObject implements HasLinkWikiMarkup, Spaced, ContentConvertible, Contained<ContentEntityObject>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTENT_TYPE |
static java.lang.String |
INLINE_PROP
ContentProperty key for the property that indicates whether or not
the comment is an inline comment. |
static java.lang.String |
MARKER_REF_PROP
ContentProperty key for the reference to the selection's markers in storage format |
static java.lang.String |
ORIGINAL_SELECTION_PROP
ContentProperty key for original selection text of the inline comment |
CREATED, CURRENT, DELETED, MODIFIED
INITIAL_VERSION
Constructor and Description |
---|
Comment() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Comment child) |
java.lang.Object |
clone() |
void |
convertToHistoricalVersion()
Remove all data from the object that does not need to be saved by historical versions.
|
java.util.List<Comment> |
getChildren() |
ContentEntityObject |
getContainer() |
ContentEntityObject |
getContentEntityObject() |
ContentId |
getContentId()
Returns the
ContentId for this Comment. |
int |
getDepth() |
java.util.Set<java.lang.String> |
getDescendantAuthors() |
int |
getDescendantsCount() |
java.lang.String |
getDisplayTitle()
Returns the display title.
|
java.lang.String |
getLinkWikiMarkup() |
java.lang.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.
|
ContentEntityObject |
getOwner() |
AbstractPage |
getPage()
Deprecated.
since 4.0. Please use
getOwner() instead. |
Comment |
getParent() |
Space |
getSpace() |
java.lang.String |
getSpaceKey()
Deprecated.
|
java.util.Date |
getThreadChangedDate() |
java.lang.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.
|
java.lang.String |
getUrlPath() |
boolean |
isInlineComment() |
void |
removeChild(Comment child) |
void |
reparentChildren(Comment newParent) |
void |
setChildren(java.util.List<Comment> children) |
void |
setOwner(ContentEntityObject owner) |
void |
setPage(AbstractPage page)
Deprecated.
|
void |
setParent(Comment parent) |
boolean |
shouldConvertToContent() |
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getAttachmentUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getDefaultBodyType, getEntity, getExcerpt, getIdAsString, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getProperties, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTitle, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, hasContentPermissions, hashCode, hasPermissions, isCurrent, isDeleted, isIndexable, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, removeReferralLink, removeTrackbackLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash, trashDependents
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings
getLatestVersion, getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
finalize, getClass, notify, notifyAll, wait, wait, wait
getId
getId, isPersistent
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String INLINE_PROP
ContentProperty
key for the property that indicates whether or not
the comment is an inline comment.public static final java.lang.String MARKER_REF_PROP
ContentProperty
key for the reference to the selection's markers in storage formatpublic static final java.lang.String ORIGINAL_SELECTION_PROP
ContentProperty
key for original selection text of the inline commentpublic ContentEntityObject getContentEntityObject()
public ContentEntityObject getContainer()
getContainer
in interface Contained<ContentEntityObject>
public ContentEntityObject getOwner()
public void setOwner(ContentEntityObject owner)
@Deprecated public AbstractPage getPage()
getOwner()
instead.getOwner()
instead.@Deprecated public void setPage(AbstractPage page)
setOwner(com.atlassian.confluence.core.ContentEntityObject)
public java.lang.String getDisplayTitle()
ContentEntityObject
getDisplayTitle
in interface Addressable
getDisplayTitle
in class ContentEntityObject
public java.lang.String getUrlPath()
getUrlPath
in interface Addressable
getUrlPath
in class ContentEntityObject
public java.lang.String getType()
ContentEntityObject
getType
in interface ContentTypeAware
getType
in class ContentEntityObject
public java.lang.String getNameForComparison()
getNameForComparison
in class ContentEntityObject
@Deprecated public java.lang.String getSpaceKey()
public Comment getParent()
public void setParent(Comment parent)
public java.util.List<Comment> getChildren()
public void setChildren(java.util.List<Comment> children)
public void addChild(Comment child)
public int getDescendantsCount()
public java.util.Set<java.lang.String> getDescendantAuthors()
public int getDepth()
public java.util.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 Versioned
convertToHistoricalVersion
in class ContentEntityObject
public void removeChild(Comment child)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class ContentEntityObject
java.lang.CloneNotSupportedException
public java.lang.String getLinkWikiMarkup()
getLinkWikiMarkup
in interface HasLinkWikiMarkup
public ContentId getContentId()
ContentId
for this Comment.getContentId
in interface ContentConvertible
getContentId
in class ContentEntityObject
public boolean shouldConvertToContent()
shouldConvertToContent
in interface ContentConvertible
public boolean isInlineComment()
Copyright © 2003-2014 Atlassian. All Rights Reserved.