Class ReadOnlySpaceDescription
- All Implemented Interfaces:
Searchable,Content,Addressable,ContentTypeAware,Versioned,RelatableEntity,EditableLabelable,Labelable,Spaced,Serializable,Cloneable,Comparable<ContentEntityObject>
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.confluence.spaces.SpaceDescription
CONTENT_TYPE_PERSONAL_SPACEDESC, CONTENT_TYPE_SPACEDESCFields inherited from class com.atlassian.confluence.core.ContentEntityObject
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DELETED_BY, DELETED_BY_ANON_VALUE, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCEFields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(Attachment attachment) voidaddComment(Comment comment) voidaddCustomContent(CustomContentEntityObject customContentEntityObject) voidaddLabelling(Labelling content) voidaddOutgoingLink(OutgoingLink link) voidaddPermission(ContentPermission permission) Adds a ContentPermission.voidapplyChildVersioningPolicy(@Nullable Versioned versionToPromote, Consumer<? super Versioned> dao) IfVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)specifies so, moves content from versionToPromote to this Versioned instance or makes no change.clone()voidRemove all data from the object that does not need to be saved by historical versions.booleangetAttachmentNamed(String fileName) Don't use it directly, use AttachmentManager.getAttachments(page) instead.getAttachmentUrlPath(Attachment attachment) Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments).Convenience method that returns the String representation of the content.Gets theBodyContentobject for this ContentEntityObject.getBodyContent(BodyType expectedBodyType) Gets theBodyContentobject for this ContentEntityObject or throws an UnsupportedOperationException if its body type is not the same as the suppliedexpectedBodyType.Returns theContentIdfor this entity object, if it implementsContentConvertible.getContentPermission(String permissionType) Gives back the first content permission of a specific type.Note, this method does not return ContentPermissions inherited from the Content's ancestry.Get the hibernate field for content status, distinguishing only draft/deleted/current status.Get the api layer enum for content status, distinguishing CURRENT/HISTORICAL/DRAFT/TRASHED.Returns the display title.Gets the ContentEntityObject that backs this piece of content.getGlobalLabels(com.atlassian.user.User user) List the labels on this content that are global labelslonggetId()intGet the number of labels that are associated with this object.Retrieve the labels that are associated with this object.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.Get the latest, current version of this versioned object.longSubclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.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())Get all the permissions that apply to this content.getPersonalLabels(com.atlassian.user.User user) List the labels on this content that are personal labels for a particular userWhen we un-index something (say, a page), we also need to un-index everything contained within that page (comments, attachments), because presumably they're all about to go away.getSpace()getTeamLabels(com.atlassian.user.User user) List the labels on this content that are team labels for a particular usergetTitle()Get trash date if this CEO has been added to the trash since Confluence 7.14.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.intReturn the version number of this version of the object.getVersionChildPolicy(ContentType contentType) Returns the rightVersionChildOwnerPolicydepending on the passed contentType.getVisibleLabels(com.atlassian.user.User user) List the labels on this content that are visible to a particular userbooleaninthashCode()booleanhasPermissions(String type) booleanDoes this content have "current" status? (non-trashed and non-draft)booleanbooleanisDraft()booleanisFavourite(ConfluenceUser user) Is this object marked as somebody's favourite?booleanpages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore uselessbooleanbooleanbooleanisNew()Is this the first version of this object?booleanThis object is persistent if the id is not 0.booleanbooleanbooleanvoidremoveAttachment(Attachment attachment) voidremoveComment(Comment comment) voidThis method removes the given ContentPermissionSet from this CEO and disconnects the set from its owner.voidremoveCustomContent(CustomContentEntityObject customContentEntityObject) voidremoveLabelling(Labelling labelling) voidvoidrestore()restores content from the trashvoidsetAttachments(List<Attachment> attachments) voidsetBodyAsString(String content) Convenience method that sets the content of this ContentEntityObject.voidsetBodyContent(BodyContent bodyContent) Sets theBodyContentobject for this ContentEntityObject.voidsetBodyContents(List<BodyContent> bodyContents) voidsetClock(com.atlassian.core.util.Clock clock) voidvoidsetComments(List<Comment> comments) voidInitialises theContentPropertiesof this ContentEntityObject by performing a deep clone of theContentEntityObjectobject's properties.voidsetContentStatus(String contentStatus) Set the hibernate field for content status, distinguishing only draft/deleted/current status.voidsetCreationDate(Date creationDate) voidsetCreator(ConfluenceUser creator) voidsetCreatorName(String creatorName) Set the username of the creatorvoidsetId(long id) voidsetLastModificationDate(Date lastModificationDate) voidsetLastModifier(ConfluenceUser lastModifier) voidsetLastModifierName(String lastModifierName) voidsetOriginalVersion(Versioned originalVersion) Set the current version of this object.voidsetOutgoingLinks(List<OutgoingLink> outgoingLinks) voidsetShareId(String shareId) voidvoidsetSynchronyRevision(String synchronyRevision) voidsetSynchronyRevisionSource(String synchronyRevisionSource) voidvoidsetVersion(int version) Set the version number of this version of the object.voidsetVersionComment(String versionComment) booleansharedAccessAllowed(com.atlassian.user.User user) Checks if this draft can be accessed by users other than the creator (shared access)booleansharedAccessAllowed(String shareId) Checks if this draft can be accessed by users other than the creator (shared access)toString()voidtrash()places content in trash canbooleanwasCreatedBy(com.atlassian.user.User user) Methods inherited from class com.atlassian.confluence.spaces.SpaceDescription
getPermissionLastModifiedDate, setPermissionLastModifiedDateMethods inherited from class com.atlassian.confluence.core.ContentEntityObject
compareTo, ensureAttachmentBelongsToContent, getAttachmentManager, getContainerContent, replaceContentProperties, restoreDependents, setContainerContent, setOriginalVersionId, toPageContext, trash, trashMethods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
setLabellingsMethods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getConfluenceRevisionMethods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getRealClass
-
Constructor Details
-
ReadOnlySpaceDescription
-
-
Method Details
-
getLabels
Description copied from interface:LabelableRetrieve the labels that are associated with this object.- Specified by:
getLabelsin interfaceLabelable- Overrides:
getLabelsin classAbstractLabelableEntityObject- Returns:
- a list of label instances.
-
getLabelCount
public int getLabelCount()Description copied from interface:LabelableGet the number of labels that are associated with this object.- Specified by:
getLabelCountin interfaceLabelable- Overrides:
getLabelCountin classAbstractLabelableEntityObject- Returns:
- the number of labels associated with this object.
-
isFavourite
Description copied from interface:LabelableIs this object marked as somebody's favourite?- Specified by:
isFavouritein interfaceLabelable- Overrides:
isFavouritein classAbstractLabelableEntityObject- Parameters:
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)- Returns:
- true if the labelable object is a 'favourite' of a given user, false otherwise
-
getVisibleLabels
Description copied from class:AbstractLabelableEntityObjectList the labels on this content that are visible to a particular user- Overrides:
getVisibleLabelsin classAbstractLabelableEntityObject- Parameters:
user- the user- Returns:
- the labels on this content visible to that user
-
getPersonalLabels
Description copied from class:AbstractLabelableEntityObjectList the labels on this content that are personal labels for a particular user- Overrides:
getPersonalLabelsin classAbstractLabelableEntityObject- Parameters:
user- the user- Returns:
- the personal labels on this content visible to the user
-
getGlobalLabels
Description copied from class:AbstractLabelableEntityObjectList the labels on this content that are global labels- Overrides:
getGlobalLabelsin classAbstractLabelableEntityObject- Parameters:
user- the user- Returns:
- the global labels on this content visible to the user
-
getTeamLabels
Description copied from class:AbstractLabelableEntityObjectList the labels on this content that are team labels for a particular user- Overrides:
getTeamLabelsin classAbstractLabelableEntityObject- Parameters:
user- the user- Returns:
- the team labels on this content visible to the user
-
getLabelsForDisplay
Description copied from class:AbstractLabelableEntityObjectList the labels on this content that are visible to a particular user, and should be shown in a list of labels. This is like {code}getVisibleLabels{code} except that it also filters out special labels like favourites- Overrides:
getLabelsForDisplayin classAbstractLabelableEntityObject- Parameters:
user- the user- Returns:
- the labels on this content visible to that user
-
getLabellings
- Specified by:
getLabellingsin interfaceEditableLabelable- Overrides:
getLabellingsin classAbstractLabelableEntityObject
-
addLabelling
- Specified by:
addLabellingin interfaceEditableLabelable- Overrides:
addLabellingin classAbstractLabelableEntityObject
-
removeLabelling
- Specified by:
removeLabellingin interfaceEditableLabelable- Overrides:
removeLabellingin classAbstractLabelableEntityObject
-
getVersion
public int getVersion()Description copied from interface:VersionedReturn the version number of this version of the object. Version numbers are integers in ascending chronological order from 1 (the first version). Clients must not assume if two versions x and y exist, that any integer versions between x and y also exist.- Specified by:
getVersionin interfaceVersioned- Overrides:
getVersionin classAbstractVersionedEntityObject- Returns:
- the version number of this version of the object
-
setVersion
public void setVersion(int version) Description copied from interface:VersionedSet the version number of this version of the object. Only call this method if you are creating a new version.- Specified by:
setVersionin interfaceVersioned- Overrides:
setVersionin classAbstractVersionedEntityObject- Parameters:
version- the new version number for this version of the object.
-
isNew
public boolean isNew()Description copied from interface:VersionedIs this the first version of this object?- Specified by:
isNewin interfaceVersioned- Overrides:
isNewin classAbstractVersionedEntityObject- Returns:
- true if this is the first version of this versioned object, false if it is a later version.
-
isLatestVersion
public boolean isLatestVersion()- Specified by:
isLatestVersionin interfaceVersioned- Overrides:
isLatestVersionin classAbstractVersionedEntityObject- Returns:
- true if this is the latest (current) version of the object, false if it is an historical version.
-
getVersionChildPolicy
Description copied from interface:VersionedReturns the rightVersionChildOwnerPolicydepending on the passed contentType. By default,VersionChildOwnerPolicy.currentVersionis returnedRight now, this is only enforced for children with content type Attachment or Comment
- Specified by:
getVersionChildPolicyin interfaceVersioned- Overrides:
getVersionChildPolicyin classAbstractVersionedEntityObject
-
getCreatorName
- Overrides:
getCreatorNamein classConfluenceEntityObject- Returns:
- username of the creator, or null if created anonymously
-
getCreator
- Overrides:
getCreatorin classConfluenceEntityObject
-
setCreatorName
Description copied from class:ConfluenceEntityObjectSet the username of the creator- Overrides:
setCreatorNamein classConfluenceEntityObject
-
getLastModifierName
- Overrides:
getLastModifierNamein classConfluenceEntityObject- Returns:
- username of the last modifier, or null if none.
-
getLastModifier
- Overrides:
getLastModifierin classConfluenceEntityObject
-
setLastModifierName
- Overrides:
setLastModifierNamein classConfluenceEntityObject
-
setCreator
- Overrides:
setCreatorin classConfluenceEntityObject
-
setLastModifier
- Overrides:
setLastModifierin classConfluenceEntityObject
-
isPersistent
public boolean isPersistent()Description copied from class:ConfluenceEntityObjectThis object is persistent if the id is not 0.- Specified by:
isPersistentin interfaceEditableLabelable- Overrides:
isPersistentin classConfluenceEntityObject- Returns:
- true if this instance is a persisted label.
-
getTypeEnum
- Overrides:
getTypeEnumin classContentEntityObject
-
getIdAsString
- Overrides:
getIdAsStringin classContentEntityObject
-
getTitle
- Specified by:
getTitlein interfaceEditableLabelable- Overrides:
getTitlein classContentEntityObject
-
setTitle
- Overrides:
setTitlein classContentEntityObject
-
getLowerTitle
- Overrides:
getLowerTitlein classContentEntityObject
-
getBodyContent
Description copied from class:ContentEntityObjectGets theBodyContentobject for this ContentEntityObject. Although it appears that there may be a number of BodyContent objects attached to a ContentEntityObject, only one is ever used. If there are none currently attached, a new BodyContent object is created and returned. Any values set on the returned BodyContent will not be saved unless a call is made toContentEntityObject.setBodyContent(com.atlassian.confluence.core.BodyContent). Null is never returned.This method should not normally be called directly unless, you need to be able to handle different body types. Use
ContentEntityObject.getBodyAsString()as you should normally be expecting only one type.- Overrides:
getBodyContentin classContentEntityObject- Returns:
- the BodyContent.
- See Also:
-
getBodyContent
Description copied from class:ContentEntityObjectGets theBodyContentobject for this ContentEntityObject or throws an UnsupportedOperationException if its body type is not the same as the suppliedexpectedBodyType.This method should not normally be called directly unless, you need to be able to handle different body types. Use
ContentEntityObject.getBodyAsString()andContentEntityObject.getBodyAsString()as you should normally be expecting only one type.- Overrides:
getBodyContentin classContentEntityObject- Parameters:
expectedBodyType- that can be handled by the caller.- Returns:
- the BodyContent.
- See Also:
-
setBodyContent
Description copied from class:ContentEntityObjectSets theBodyContentobject for this ContentEntityObject.This method should not normally be called directly unless, you need to be able to handle different body types. Use
ContentEntityObject.setBodyAsString(java.lang.String)as you should normally be expecting only one type.- Overrides:
setBodyContentin classContentEntityObject- Parameters:
bodyContent- to be set. If the supplied bodyContent or its body arenull, the list of body contents are cleared.
-
getBodyAsString
Description copied from class:ContentEntityObjectConvenience method that returns the String representation of the content.- Overrides:
getBodyAsStringin classContentEntityObject- Returns:
- the content.
-
setBodyAsString
Description copied from class:ContentEntityObjectConvenience method that sets the content of this ContentEntityObject.- Overrides:
setBodyAsStringin classContentEntityObject- Parameters:
content- the String representation of the content.
-
getBodyContents
- Overrides:
getBodyContentsin classContentEntityObject
-
setBodyContents
- Overrides:
setBodyContentsin classContentEntityObject
-
getOutgoingLinks
Description copied from class:ContentEntityObjectAn 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())- Overrides:
getOutgoingLinksin classContentEntityObject- Returns:
- List of OutgoingLinks
-
setOutgoingLinks
- Overrides:
setOutgoingLinksin classContentEntityObject
-
addOutgoingLink
- Overrides:
addOutgoingLinkin classContentEntityObject
-
removeOutgoingLink
- Overrides:
removeOutgoingLinkin classContentEntityObject
-
setOriginalVersion
Description copied from interface:VersionedSet the current version of this object. After this method is called, this object will become an historical version of the object passed in.- Specified by:
setOriginalVersionin interfaceVersioned- Overrides:
setOriginalVersionin classContentEntityObject- Parameters:
originalVersion- the current version of this object.
-
applyChildVersioningPolicy
public void applyChildVersioningPolicy(@Nullable Versioned versionToPromote, Consumer<? super Versioned> dao) Description copied from interface:VersionedIfVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)specifies so, moves content from versionToPromote to this Versioned instance or makes no change.- Specified by:
applyChildVersioningPolicyin interfaceVersioned- Overrides:
applyChildVersioningPolicyin classContentEntityObject- Parameters:
versionToPromote- the new version of the current instance that we're getting the children fromdao- onRemove used to delete dangling contained content
-
equals
- Overrides:
equalsin classContentEntityObject
-
toString
- Overrides:
toStringin classContentEntityObject
-
getSearchableDependants
Description copied from interface:SearchableWhen we un-index something (say, a page), we also need to un-index everything contained within that page (comments, attachments), because presumably they're all about to go away. -
getPermissions
Description copied from class:ContentEntityObjectGet all the permissions that apply to this content. Please do not modify the contents of this list!
- Overrides:
getPermissionsin classContentEntityObject- Returns:
- a list of all the permissions that apply to this content.
-
getContentPermission
Description copied from class:ContentEntityObjectGives back the first content permission of a specific type. Returns only the permission if it is set on this object and not inherited. Returns null if no permission can't be found.Synchronized, as otherwise it was creating timing issues during the multi-threaded re-indexing.
- Overrides:
getContentPermissionin classContentEntityObject- Returns:
- ContentPermission
-
getContentStatusObject
Description copied from class:ContentEntityObjectGet the api layer enum for content status, distinguishing CURRENT/HISTORICAL/DRAFT/TRASHED.Important: this has different semantics from the hibernate field
ContentEntityObject.getContentStatus(), because it takes into account historical status, and uses different strings for some values.- Overrides:
getContentStatusObjectin classContentEntityObject- Returns:
- the API ContentStatus for this content, distinguishing CURRENT/HISTORICAL/DRAFT/TRASHED
- See Also:
-
getContentStatus
Description copied from class:ContentEntityObjectGet the hibernate field for content status, distinguishing only draft/deleted/current status.Important: this is not the same as the string value of the api
ContentEntityObject.getContentStatusObject(), because that one takes into account historical status, and uses different strings for some values.This method does NOT distinguish current and historical versions. Both will return "current". See
AbstractVersionedEntityObject.isLatestVersion()to distinguish them.- Overrides:
getContentStatusin classContentEntityObject- Returns:
- the hibernate field value, distinguishing only
ContentEntityObject.CURRENT,ContentEntityObject.DRAFT,ContentEntityObject.DELETED. - See Also:
-
setContentStatus
Description copied from class:ContentEntityObjectSet the hibernate field for content status, distinguishing only draft/deleted/current status.Important: this is not the same as the string value of the api
ContentEntityObject.getContentStatusObject(), because that one takes into account historical status, and uses different strings for some values.This method does NOT distinguish current and historical versions. Both use "current". See
AbstractVersionedEntityObject.isLatestVersion()to distinguish them.- Overrides:
setContentStatusin classContentEntityObject- Parameters:
contentStatus- the hibernate field value,ContentEntityObject.CURRENT,ContentEntityObject.DRAFT,ContentEntityObject.DELETED.- See Also:
-
isCurrent
public boolean isCurrent()Description copied from class:ContentEntityObjectDoes this content have "current" status? (non-trashed and non-draft)This method does NOT distinguish current and historical versions. Both will return true. See
AbstractVersionedEntityObject.isLatestVersion()to distinguish them.- Overrides:
isCurrentin classContentEntityObject- Returns:
- true if the content is live, i.e. not trashed and not a draft
- See Also:
-
isDeleted
public boolean isDeleted()- Overrides:
isDeletedin classContentEntityObject
-
isDraft
public boolean isDraft()- Overrides:
isDraftin classContentEntityObject
-
getSynchronyRevision
- Overrides:
getSynchronyRevisionin classContentEntityObject- See Also:
-
setSynchronyRevision
- Overrides:
setSynchronyRevisionin classContentEntityObject- See Also:
-
getSynchronyRevisionSource
- Overrides:
getSynchronyRevisionSourcein classContentEntityObject- See Also:
-
getTrashDate
Description copied from class:ContentEntityObjectGet trash date if this CEO has been added to the trash since Confluence 7.14. For generic cases, useTrashManagerInternal#findTrashDate- Overrides:
getTrashDatein classContentEntityObject- Returns:
- when this content entity was added to the trash or
Optional.empty()if it was trashed before 7.14
-
setSynchronyRevisionSource
- Overrides:
setSynchronyRevisionSourcein classContentEntityObject- See Also:
-
getCollaborativeEditingUuid
- Overrides:
getCollaborativeEditingUuidin classContentEntityObject- See Also:
-
setCollaborativeEditingUuid
- Overrides:
setCollaborativeEditingUuidin classContentEntityObject- See Also:
-
isUnpublished
public boolean isUnpublished()- Overrides:
isUnpublishedin classContentEntityObject
-
wasCreatedBy
public boolean wasCreatedBy(com.atlassian.user.User user) - Overrides:
wasCreatedByin classContentEntityObject
-
trash
public void trash()Description copied from class:ContentEntityObjectplaces content in trash can- Overrides:
trashin classContentEntityObject
-
restore
public void restore()Description copied from class:ContentEntityObjectrestores content from the trash- Overrides:
restorein classContentEntityObject
-
getAttachments
Description copied from class:ContentEntityObjectDon't use it directly, use AttachmentManager.getAttachments(page) instead.
This also includes trashed items.
- Overrides:
getAttachmentsin classContentEntityObject
-
getLatestVersionsOfAttachments
- Overrides:
getLatestVersionsOfAttachmentsin classContentEntityObject
-
setAttachments
- Overrides:
setAttachmentsin classContentEntityObject
-
addAttachment
- Overrides:
addAttachmentin classContentEntityObject
-
removeAttachment
- Overrides:
removeAttachmentin classContentEntityObject
-
getBodyAsStringWithoutMarkup
- Overrides:
getBodyAsStringWithoutMarkupin classContentEntityObject
-
getExcerpt
- Overrides:
getExcerptin classContentEntityObject
-
getAttachmentsUrlPath
- Overrides:
getAttachmentsUrlPathin classContentEntityObject
-
getAttachmentNamed
- Overrides:
getAttachmentNamedin classContentEntityObject
-
getVersionComment
- Overrides:
getVersionCommentin classContentEntityObject
-
setVersionComment
- Overrides:
setVersionCommentin classContentEntityObject
-
isVersionCommentAvailable
public boolean isVersionCommentAvailable()- Overrides:
isVersionCommentAvailablein classContentEntityObject
-
clone
- Overrides:
clonein classContentEntityObject
-
getRenderedVersionComment
- Overrides:
getRenderedVersionCommentin classContentEntityObject
-
getContentPermissionSet
Description copied from class:ContentEntityObjectNote, this method does not return ContentPermissions inherited from the Content's ancestry.- Overrides:
getContentPermissionSetin classContentEntityObject- Returns:
- a set containing
ContentPermissions of this type, or null if there are no content permissions explicitly set on this ContentEntityObject for the type.
-
hasPermissions
- Overrides:
hasPermissionsin classContentEntityObject- Returns:
- true if this content entity object contains any
ContentPermissions of the type specified
-
hasContentPermissions
public boolean hasContentPermissions()- Overrides:
hasContentPermissionsin classContentEntityObject
-
addPermission
Description copied from class:ContentEntityObjectAdds a ContentPermission. Do not add them manually viaContentPermissionSet.addContentPermission(ContentPermission). If possible useContentPermissionManager.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)- Overrides:
addPermissionin classContentEntityObject
-
removeContentPermissionSet
Description copied from class:ContentEntityObjectThis method removes the given ContentPermissionSet from this CEO and disconnects the set from its owner. This method should only be called by the DefaultContentPermissionManager. 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) -
getComments
- Overrides:
getCommentsin classContentEntityObject
-
setComments
- Overrides:
setCommentsin classContentEntityObject
-
addComment
- Overrides:
addCommentin classContentEntityObject
-
removeComment
- Overrides:
removeCommentin classContentEntityObject
-
getCustomContent
- Overrides:
getCustomContentin classContentEntityObject- Returns:
- all custom content that is a child of this CEO.
-
addCustomContent
- Overrides:
addCustomContentin classContentEntityObject
-
removeCustomContent
- Overrides:
removeCustomContentin classContentEntityObject
-
getEntity
Description copied from interface:ContentGets the ContentEntityObject that backs this piece of content.- Specified by:
getEntityin interfaceContent- Overrides:
getEntityin classContentEntityObject- Returns:
- the persistent object behind this content
-
getContentId
Description copied from class:ContentEntityObjectReturns theContentIdfor this entity object, if it implementsContentConvertible.Subclasses implementing ContentConvertible must override this method.
- Overrides:
getContentIdin classContentEntityObject- Returns:
- the ContentId representation of this object's id
-
getSelector
- Overrides:
getSelectorin classContentEntityObject- Returns:
- the ContentSelector for this entity, which will always include the id of the latest version, and the version number for this version of the entity.
-
getProperties
- Overrides:
getPropertiesin classContentEntityObject- Returns:
- the content properties associated with this entity
-
setContentPropertiesFrom
Description copied from class:ContentEntityObjectInitialises theContentPropertiesof this ContentEntityObject by performing a deep clone of theContentEntityObjectobject's properties.- Overrides:
setContentPropertiesFromin classContentEntityObject
-
getOriginalVersionId
- Overrides:
getOriginalVersionIdin classContentEntityObject
-
getLatestVersionId
public long getLatestVersionId()- Overrides:
getLatestVersionIdin classContentEntityObject
-
getSpace
- Specified by:
getSpacein interfaceSpaced- Overrides:
getSpacein classSpaceContentEntityObject
-
setSpace
- Overrides:
setSpacein classSpaceContentEntityObject
-
convertToHistoricalVersion
public void convertToHistoricalVersion()Description copied from interface:VersionedRemove 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.
- Specified by:
convertToHistoricalVersionin interfaceVersioned- Overrides:
convertToHistoricalVersionin classSpaceContentEntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classSpaceContentEntityObject
-
getNameForComparison
Description copied from class:ContentEntityObjectSubclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.- Overrides:
getNameForComparisonin classSpaceContentEntityObject
-
isIndexable
public boolean isIndexable()Description copied from class:SpaceContentEntityObjectpages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore useless- Specified by:
isIndexablein interfaceSearchable- Overrides:
isIndexablein classSpaceContentEntityObject
-
isInSpace
- Overrides:
isInSpacein classSpaceContentEntityObject
-
getDisplayTitle
Description copied from class:ContentEntityObjectReturns 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.- Specified by:
getDisplayTitlein interfaceAddressable- Overrides:
getDisplayTitlein classSpaceDescription- Returns:
- the display title
-
getLatestVersion
Description copied from interface:VersionedGet the latest, current version of this versioned object. If this object is the current version, return this object.Note that drafts are a special version of a
ContentEntityObjectso for drafts this method should return theContentEntityObjectthe drafts points to if it exists and the draft itself otherwise.- Specified by:
getLatestVersionin interfaceVersioned- Overrides:
getLatestVersionin classSpaceDescription- Returns:
- the current version of this object.
- See Also:
-
getUrlPath
- Specified by:
getUrlPathin interfaceAddressable- Overrides:
getUrlPathin classSpaceDescription- Returns:
- a link to the home page of the associated space
-
getType
Description copied from class:ContentEntityObjectAn 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.
- Specified by:
getTypein interfaceContentTypeAware- Overrides:
getTypein classSpaceDescription- Returns:
- the content type
-
getSpaceKey
- Overrides:
getSpaceKeyin classSpaceDescription
-
isPersonalSpace
public boolean isPersonalSpace()- Overrides:
isPersonalSpacein classSpaceDescription
-
getDefaultBodyType
- Overrides:
getDefaultBodyTypein classSpaceDescription
-
getAttachmentUrlPath
Description copied from class:ContentEntityObjectGets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments). Generally you will want to callAttachment.getUrlPath()instead of this method: if we ever implement view pages for individual attachments, that's the method that will be changed to point to them.The default implementation just returns the view page for this content.
- Overrides:
getAttachmentUrlPathin classSpaceDescription- Parameters:
attachment- one of this content's attachments- Returns:
- the path relative to the base url to view the attachment in the context of this content.
-
getId
public long getId()- Specified by:
getIdin interfaceAddressable- Specified by:
getIdin interfaceEditableLabelable- Specified by:
getIdin interfaceSearchable- Overrides:
getIdin classcom.atlassian.core.bean.EntityObject
-
setId
public void setId(long id) - Overrides:
setIdin classcom.atlassian.core.bean.EntityObject
-
getCreationDate
- Overrides:
getCreationDatein classAnnotatedEntityObject
-
setCreationDate
- Overrides:
setCreationDatein classcom.atlassian.core.bean.EntityObject
-
getLastModificationDate
- Overrides:
getLastModificationDatein classAnnotatedEntityObject
-
setLastModificationDate
- Overrides:
setLastModificationDatein classcom.atlassian.core.bean.EntityObject
-
setClock
public void setClock(com.atlassian.core.util.Clock clock) - Overrides:
setClockin classcom.atlassian.core.bean.EntityObject
-
getCurrentDate
- Overrides:
getCurrentDatein classcom.atlassian.core.bean.EntityObject
-