|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.ConfluenceEntityObject
com.atlassian.confluence.core.AbstractVersionedEntityObject
com.atlassian.confluence.core.ContentEntityObject
com.atlassian.confluence.core.SpaceContentEntityObject
com.atlassian.confluence.content.DefaultContent
public class DefaultContent
Default implementation of Content.
SpaceContentEntityObject for the time being. This
introduces some empty implementations of methods such as getSpace(). These implementations are
explicitly defined to keep an eye on what is being used from the ContentEntityObject implementation
so we know what we will need to (eventualy) implement.
| Field Summary |
|---|
| Fields inherited from class com.atlassian.confluence.core.ContentEntityObject |
|---|
CREATED, CURRENT, DELETED, MODIFIED |
| Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject |
|---|
INITIAL_VERSION |
| Constructor Summary | |
|---|---|
protected |
DefaultContent()
This exists only for hibernate. |
|
DefaultContent(ContentType contentType)
|
| Method Summary | |
|---|---|
Content |
getContainer()
Get the container for this content. |
ContentType |
getContentType()
Get the type of the content. |
java.util.List |
getLabels()
Retrieve the labels that are associated with this object. |
java.lang.String |
getNameForComparison()
Subclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities. |
Content |
getParent()
Get the parent content of this content. |
Space |
getSpace()
Get the space that the content belongs to |
java.lang.String |
getStatus()
Get the status of the content, this can be used to allow/deny access/viewing of contents. |
java.lang.String |
getText()
Get the text data of this content. |
java.lang.String |
getTitle()
Get the title of this content. |
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()
|
void |
setParent(Content parent)
Sets the parent of this content. |
void |
setSpace(Space space)
Set the space this content belongs to |
void |
setStatus(java.lang.String status)
Set ths status of this content. |
void |
setText(java.lang.String text)
Sets the text data of this content. |
void |
setTitle(java.lang.String title)
Sets the title of this content. |
| Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject |
|---|
addTrackbackLink, convertToHistoricalVersion, getSpaceKey, hashCode, isIndexable, isInSpace |
| Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject |
|---|
getLatestVersion, getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion |
| Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject |
|---|
getCreatorName, getLastModifierName, getRealClass, isPersistent, setCreatorName, setLastModifierName |
| Methods inherited from class com.atlassian.core.bean.EntityObject |
|---|
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.atlassian.bonnie.Searchable |
|---|
getId |
| Methods inherited from interface com.atlassian.confluence.core.Addressable |
|---|
getId |
| Constructor Detail |
|---|
protected DefaultContent()
public DefaultContent(ContentType contentType)
| Method Detail |
|---|
public java.lang.String getTitle()
Content
getTitle in interface ContentgetTitle in class ContentEntityObjectString representation ot the content's title.public void setTitle(java.lang.String title)
Content
setTitle in interface ContentsetTitle in class ContentEntityObjecttitle - the title of this contentpublic Space getSpace()
Content
getSpace in interface ContentgetSpace in class SpaceContentEntityObjectSpace the space which the content belongs to.public void setSpace(Space space)
Content
setSpace in interface ContentsetSpace in class SpaceContentEntityObjectspace - the new spacepublic java.util.List getLabels()
Labelable
getLabels in interface ContentgetLabels in interface LabelablegetLabels in class ContentEntityObjectpublic java.lang.String getType()
ContentEntityObject
getType in interface ContentgetType in interface AddressablegetType in class ContentEntityObjectContentType, this should return the same value as
getContentType().getNamepublic java.lang.String getUrlPath()
getUrlPath in interface AddressablegetUrlPath in class ContentEntityObjectpublic java.lang.String getNameForComparison()
ContentEntityObject
getNameForComparison in class SpaceContentEntityObjectpublic Content getParent()
ContentGet the parent content of this content. If the content doesn't have any parent then
null will be returned.
Examples of parent/child relationship can be a page and a comment, where the comment has the page as a parent, but if you reply to a comment then its 'direct' parent will be the comment it is replying to.
getParent in interface ContentContent of this content. null if this content doesn't have
a parent.public void setParent(Content parent)
Contentnull to indicate this content has no parent.
setParent in interface Contentparent - the new parent of this contentContent.getParent()public java.lang.String getStatus()
ContentGet the status of the content, this can be used to allow/deny access/viewing of contents.
For example a page could be 'deleted' and therefore not be visible (except from the trash), a blogpost could have a status 'pending' and not be visible except by the author.
getStatus in interface ContentString representation of the content's status.public void setStatus(java.lang.String status)
Content
setStatus in interface Contentstatus - the new statuspublic Content getContainer()
ContentGet the container for this content.
The container represents the closest parent that is of a different ContentType. For example,
a comment, no matter how deeply threaded, has its page as a container.
getContainer in interface ContentContent that 'contains' this content. null if this content has
no container.public ContentType getContentType()
ContentGet the type of the content.
The ContentType allow implementation of the strategy pattern. One can retrieve some (if not all) of
a specific content behavior through the ContentType.
getContentType in interface ContentContentType of this content.public java.lang.String getText()
ContentGet the text data of this content.
This should never return null
getText in interface ContentContent.setText(String)public void setText(java.lang.String text)
ContentSets the text data of this content.
setText in interface Contenttext - the text to set this content toContent.getText()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||