public class

Comment

extends ContentEntityObject
implements HasLinkWikiMarkup Spaced
java.lang.Object
   ↳ com.atlassian.core.bean.EntityObject
     ↳ com.atlassian.confluence.core.ConfluenceEntityObject
       ↳ com.atlassian.confluence.core.AbstractVersionedEntityObject
         ↳ com.atlassian.confluence.core.AbstractLabelableEntityObject
           ↳ com.atlassian.confluence.core.ContentEntityObject
             ↳ com.atlassian.confluence.pages.Comment

Summary

Constants
String CONTENT_TYPE
[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractVersionedEntityObject
Public Constructors
Comment()
Public Methods
void addChild(Comment child)
Object clone()
void convertToHistoricalVersion()
Remove all data from the object that does not need to be saved by historical versions.
List<Comment> getChildren()
ContentEntityObject getContentEntityObject()
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.
ContentEntityObject getOwner()
@Deprecated AbstractPage getPage()
This method is deprecated. since 4.0. Please use getOwner() instead.
Comment getParent()
Space getSpace()
@Deprecated String getSpaceKey()
convenience method for lucene to retrieve the key of the space this comment belongs to
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()
void removeChild(Comment child)
void reparentChildren(Comment newParent)
void setChildren(List<Comment> children)
void setOwner(ContentEntityObject owner)
@Deprecated void setPage(AbstractPage page)
This method is deprecated. Since 3.3 Use setOwner(com.atlassian.confluence.core.ContentEntityObject)
void setParent(Comment parent)
[Expand]
Inherited Methods
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractLabelableEntityObject
From class com.atlassian.confluence.core.AbstractVersionedEntityObject
From class com.atlassian.confluence.core.ConfluenceEntityObject
From class com.atlassian.core.bean.EntityObject
From class java.lang.Object
From interface com.atlassian.bonnie.Searchable
From interface com.atlassian.confluence.content.Content
From interface com.atlassian.confluence.core.Addressable
From interface com.atlassian.confluence.core.ContentTypeAware
From interface com.atlassian.confluence.core.HasLinkWikiMarkup
From interface com.atlassian.confluence.core.Versioned
From interface com.atlassian.confluence.labels.EditableLabelable
From interface com.atlassian.confluence.labels.Labelable
From interface com.atlassian.confluence.spaces.Spaced
From interface java.lang.Comparable

Constants

public static final String CONTENT_TYPE

Constant Value: "comment"

Public Constructors

public Comment ()

Public Methods

public void addChild (Comment child)

public Object clone ()

public void convertToHistoricalVersion ()

Remove all data from the object that does not need to be saved by historical versions. For versioned objects that are persisted, this includes removing associations with other persisted objects that may otherwise cause us to break the expected arity of the database relations.

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.

public List<Comment> getChildren ()

public ContentEntityObject getContentEntityObject ()

public int getDepth ()

public Set<String> getDescendantAuthors ()

public int getDescendantsCount ()

public String getDisplayTitle ()

Returns the display title. Some entities don't have titles for identification. For example, personal information objects use the user's fullname. Override this method to provide a custom title.

Returns
  • the display title

public String getLinkWikiMarkup ()

public 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. Nifty, eh.

public ContentEntityObject getOwner ()

@Deprecated public AbstractPage getPage ()

This method is deprecated.
since 4.0. Please use getOwner() instead.

Please use getOwner() instead.

public Comment getParent ()

public Space getSpace ()

@Deprecated public String getSpaceKey ()

convenience method for lucene to retrieve the key of the space this comment belongs to

Returns
  • the space key

public Date getThreadChangedDate ()

public 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.

This 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.

public String getUrlPath ()

public void removeChild (Comment child)

public void reparentChildren (Comment newParent)

public void setChildren (List<Comment> children)

public void setOwner (ContentEntityObject owner)

@Deprecated public void setPage (AbstractPage page)

This method is deprecated.
Since 3.3 Use setOwner(com.atlassian.confluence.core.ContentEntityObject)

public void setParent (Comment parent)