|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 Content
getTitle
in class ContentEntityObject
String
representation ot the content's title.public void setTitle(java.lang.String title)
Content
setTitle
in interface Content
setTitle
in class ContentEntityObject
title
- the title of this contentpublic Space getSpace()
Content
getSpace
in interface Content
getSpace
in interface Spaced
getSpace
in class SpaceContentEntityObject
Space
the space which the content belongs to.public void setSpace(Space space)
Content
setSpace
in interface Content
setSpace
in class SpaceContentEntityObject
space
- the new spacepublic java.util.List getLabels()
Labelable
getLabels
in interface Content
getLabels
in interface Labelable
getLabels
in class ContentEntityObject
public java.lang.String getType()
ContentEntityObject
getType
in interface Content
getType
in interface ContentTypeAware
getType
in class ContentEntityObject
public java.lang.String getUrlPath()
getUrlPath
in interface Addressable
getUrlPath
in class ContentEntityObject
public java.lang.String getNameForComparison()
ContentEntityObject
getNameForComparison
in class SpaceContentEntityObject
public Content getParent()
Content
Get 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 Content
Content
of this
content. null
if this content doesn't have
a parent.public void setParent(Content parent)
Content
null
to indicate this content has no parent.
setParent
in interface Content
parent
- the new parent of this contentContent.getParent()
public java.lang.String getStatus()
Content
Get 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 Content
String
representation of the content's status.public void setStatus(java.lang.String status)
Content
setStatus
in interface Content
status
- the new statuspublic Content getContainer()
Content
Get 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 Content
Content
that 'contains' this
content. null
if this content has
no container.public ContentType getContentType()
Content
Get 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 Content
ContentType
of this content.public java.lang.String getText()
Content
Get the text data of this
content.
This should never return null
getText
in interface Content
Content.setText(String)
public void setText(java.lang.String text)
Content
Sets the text data of this
content.
setText
in interface Content
text
- the text to set this content toContent.getText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |