|
||||||||||
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
public abstract class ContentEntityObject
Field Summary | |
---|---|
static java.lang.String |
CREATED
|
static java.lang.String |
CURRENT
|
static java.lang.String |
DELETED
|
static java.lang.String |
MODIFIED
|
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject |
---|
INITIAL_VERSION |
Constructor Summary | |
---|---|
protected |
ContentEntityObject()
|
Method Summary | |
---|---|
void |
addAttachment(Attachment attachment)
|
void |
addLabelling(Labelling content)
|
void |
addOutgoingLink(OutgoingLink link)
|
void |
addPermission(ContentPermission permission)
Adds a ContentPermission. |
void |
addReferralLink(ReferralLink link)
|
void |
addTrackbackLink(TrackbackLink link)
|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
Content entities are naturally ordered alphabetically by "comparison name", which depends on the entity (it's the title for pages, the parent page title for comments, etc.). |
void |
convertToHistoricalVersion()
Remove all data from the object that does not need to be saved by historical versions. |
boolean |
equals(java.lang.Object o)
|
Attachment |
getAttachmentNamed(java.lang.String fileName)
|
java.util.List<Attachment> |
getAttachments()
Don't use it directly, use AttachmentManager.getAttachments(page) instead |
java.lang.String |
getAttachmentsUrlPath()
|
java.util.List |
getBodyContents()
|
java.lang.String |
getContent()
|
ContentPermission |
getContentPermission(java.lang.String permissionType)
Deprecated. use getContentPermissionSet |
ContentPermissionSet |
getContentPermissionSet(java.lang.String type)
Note, this method does not return ContentPermissions inherited from the Content's ancestry. |
java.lang.String |
getContentStatus()
|
java.lang.String |
getDisplayTitle()
Returns the display title. |
java.lang.String |
getExcerpt()
|
java.util.List |
getGlobalLabels(com.atlassian.user.User user)
List the labels on this content that are global labels |
java.lang.String |
getIdAsString()
|
int |
getLabelCount()
Get the number of labels that are associated with this object. |
java.util.List |
getLabellings()
|
java.util.List<Label> |
getLabels()
Retrieve the labels that are associated with this object. |
java.util.List |
getLabelsForDisplay(com.atlassian.user.User user)
List the labels on this content that are visible to a particular user, and should be shown in a list of labels. |
LabelUtil |
getLabelUtil()
|
java.util.List<Attachment> |
getLatestVersionsOfAttachments()
Don't use it directly, use AttachmentManager.getLatestVersionsOfAttachments(page) instead |
abstract 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. |
java.util.List |
getOutgoingLinks()
An outgoing link is a link on this page to another confluence page. It could also link to a website URL These links are contained in the page content They are refreshed each time the page is updated (LinkManager.updateOutgoingLinks()) |
java.util.List |
getPermissions()
Deprecated. use getContentPermissionSet(String) |
java.util.List |
getPersonalLabels(com.atlassian.user.User user)
List the labels on this content that are personal labels for a particular user |
java.lang.String |
getRealTitle()
Deprecated. since 2.8 - badly named, use getDisplayTitle() |
java.util.List |
getReferralLinks()
|
java.lang.String |
getRenderedVersionComment()
|
java.util.Collection |
getSearchableDependants()
|
java.lang.String |
getTitle()
|
java.util.List |
getTrackbackLinks()
|
abstract 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. |
abstract java.lang.String |
getUrlPath()
|
UserAccessor |
getUserAccessor()
|
java.lang.String |
getVersionComment()
|
java.util.List |
getVisibleLabels(com.atlassian.user.User user)
List the labels on this content that are visible to a particular user |
boolean |
hasContentPermissions()
|
int |
hashCode()
|
boolean |
hasPermissions(java.lang.String type)
|
boolean |
isCurrent()
|
boolean |
isDeleted()
|
boolean |
isFavourite(com.atlassian.user.User user)
Is this object marked as somebody's favourite? |
boolean |
isIndexable()
Content entity objects that are historical versions should not be indexed. |
boolean |
isRecentlyUpdatedFor(com.atlassian.user.User user)
Returns true if the page has been created or modified since the user last logged in. |
boolean |
isVersionCommentAvailable()
|
void |
removeAttachment(Attachment attachment)
|
void |
removeContentPermissionSet(ContentPermissionSet set)
This method removes the given ContentPermissionSet from this CEO and disconnects the set from its owner. |
void |
removeLabelling(Labelling labelling)
|
void |
removeOutgoingLink(OutgoingLink link)
|
void |
removeReferralLink(ReferralLink link)
|
void |
removeTrackbackLink(TrackbackLink link)
|
void |
setAttachments(java.util.List attachments)
|
void |
setBodyContents(java.util.List bodyContents)
|
void |
setContent(java.lang.String content)
|
void |
setContentStatus(java.lang.String contentStatus)
|
void |
setOutgoingLinks(java.util.List outgoingLinks)
|
void |
setReferralLinks(java.util.List referralLinks)
|
void |
setTitle(java.lang.String title)
|
void |
setTrackbackLinks(java.util.List trackbackLinks)
|
void |
setUserAccessor(UserAccessor userAccessor)
|
void |
setVersionComment(java.lang.String versionComment)
|
PageContext |
toPageContext()
When the content is rendered, what context is it being rendered in? |
java.lang.String |
toString()
|
void |
trash()
places content in trash can |
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 |
Field Detail |
---|
public static final java.lang.String CURRENT
public static final java.lang.String DELETED
public static final java.lang.String CREATED
public static final java.lang.String MODIFIED
Constructor Detail |
---|
protected ContentEntityObject()
Method Detail |
---|
public abstract java.lang.String getType()
getType
in interface ContentTypeAware
public java.lang.String getIdAsString()
public java.lang.String getDisplayTitle()
getDisplayTitle
in interface Addressable
public final java.lang.String getRealTitle()
getDisplayTitle()
public abstract java.lang.String getUrlPath()
getUrlPath
in interface Addressable
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getContent()
public void setContent(java.lang.String content)
public java.util.List getBodyContents()
public void setBodyContents(java.util.List bodyContents)
public java.util.List getOutgoingLinks()
public void setOutgoingLinks(java.util.List outgoingLinks)
public void addOutgoingLink(OutgoingLink link)
public void removeOutgoingLink(OutgoingLink link)
public java.util.List getReferralLinks()
public void setReferralLinks(java.util.List referralLinks)
public void addReferralLink(ReferralLink link)
public void removeReferralLink(ReferralLink link)
public java.util.List getTrackbackLinks()
public void setTrackbackLinks(java.util.List trackbackLinks)
public void addTrackbackLink(TrackbackLink link)
public void removeTrackbackLink(TrackbackLink link)
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 AbstractVersionedEntityObject
public boolean equals(java.lang.Object o)
equals
in class com.atlassian.core.bean.EntityObject
public int hashCode()
hashCode
in class com.atlassian.core.bean.EntityObject
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String getNameForComparison()
public final int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.util.Collection getSearchableDependants()
getSearchableDependants
in interface com.atlassian.bonnie.Searchable
public final PageContext toPageContext()
public boolean isRecentlyUpdatedFor(com.atlassian.user.User user)
user
-
public boolean isIndexable()
isIndexable
in interface com.atlassian.bonnie.Searchable
public java.util.List getPermissions()
getContentPermissionSet(String)
Get all the permissions that apply to this content. Please do not modify the contents of this list!
public ContentPermission getContentPermission(java.lang.String permissionType)
public java.lang.String getContentStatus()
public void setContentStatus(java.lang.String contentStatus)
public boolean isCurrent()
public boolean isDeleted()
public void trash()
public java.util.List<Attachment> getAttachments()
public java.util.List<Attachment> getLatestVersionsOfAttachments()
public void setAttachments(java.util.List attachments)
public void addAttachment(Attachment attachment)
public void removeAttachment(Attachment attachment)
public java.lang.String getExcerpt()
public java.lang.String getAttachmentsUrlPath()
public Attachment getAttachmentNamed(java.lang.String fileName)
public java.util.List getLabellings()
public void addLabelling(Labelling content)
public void removeLabelling(Labelling labelling)
public java.util.List<Label> getLabels()
Labelable
getLabels
in interface Labelable
public int getLabelCount()
Labelable
getLabelCount
in interface Labelable
public boolean isFavourite(com.atlassian.user.User user)
Labelable
isFavourite
in interface Labelable
user
- the user who is being checked against. If user is null
this method must always return false (anonymous users can not
mark anything as a favourite, obviously)
public java.util.List getVisibleLabels(com.atlassian.user.User user)
user
- the user
public java.util.List getPersonalLabels(com.atlassian.user.User user)
user
- the user
public java.util.List getGlobalLabels(com.atlassian.user.User user)
user
- the user
public java.util.List getLabelsForDisplay(com.atlassian.user.User user)
user
- the user
public LabelUtil getLabelUtil()
public java.lang.String getVersionComment()
public void setVersionComment(java.lang.String versionComment)
public boolean isVersionCommentAvailable()
public UserAccessor getUserAccessor()
public void setUserAccessor(UserAccessor userAccessor)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class com.atlassian.core.bean.EntityObject
java.lang.CloneNotSupportedException
public java.lang.String getRenderedVersionComment()
public ContentPermissionSet getContentPermissionSet(java.lang.String type)
ContentPermission
s of this type, or null if there are no content permissions
explicitly set on this ContentEntityObject for the type.public boolean hasPermissions(java.lang.String type)
ContentPermission
s of the type specifiedpublic boolean hasContentPermissions()
public void addPermission(ContentPermission permission)
ContentPermissionSet.addContentPermission(ContentPermission)
. If possible use
ContentPermissionManager.addContentPermission(com.atlassian.confluence.security.ContentPermission, ContentEntityObject)
instead.
Also note that as of Confluence 2.4 although methods have been added to facilitate having multiple ContentPermissions
per page, Confluence does not yet properly support them (eg users permitted by them will not see the data
in their searches)
public void removeContentPermissionSet(ContentPermissionSet set)
DefaultContentPermissionManager.removeContentPermission(com.atlassian.confluence.security.ContentPermission)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |