Class ReadOnlyAttachment
- All Implemented Interfaces:
Searchable
,Content
,Addressable
,ContentTypeAware
,HasLinkWikiMarkup
,Versioned
,RelatableEntity
,EditableLabelable
,Labelable
,Contained<ContentEntityObject>
,ContentConvertible
,SearchableAttachment
,Spaced
,Serializable
,Cloneable
,Comparable<ContentEntityObject>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.pages.Attachment
Attachment.Type
-
Field Summary
Fields inherited from class com.atlassian.confluence.pages.Attachment
API_REVISION, API_REVISION_V2, CONTENT_TYPE, DOWNLOAD_PATH_BASE, PROFILE_PICTURE_COMMENT, PROP_FILE_STORE_ID, PROP_FILESIZE, PROP_HIDDEN, PROP_MEDIA_TYPE, PROP_MINOR_EDIT
Fields 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_SOURCE
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyAttachment
(Attachment delegate) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(Attachment attachment) Deprecated, for removal: This API element is subject to removal in a future version.void
addComment
(Comment comment) Deprecated, for removal: This API element is subject to removal in a future version.void
addCustomContent
(CustomContentEntityObject customContentEntityObject) Deprecated, for removal: This API element is subject to removal in a future version.void
addLabelling
(Labelling content) Deprecated, for removal: This API element is subject to removal in a future version.void
addOutgoingLink
(OutgoingLink link) Deprecated, for removal: This API element is subject to removal in a future version.void
addPermission
(ContentPermission permission) Deprecated, for removal: This API element is subject to removal in a future version.Adds a ContentPermission.void
applyChildVersioningPolicy
(@Nullable Versioned versionToPromote, Consumer<? super Versioned> dao) Deprecated, for removal: This API element is subject to removal in a future version.IfVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)
specifies so, moves content from versionToPromote to this Versioned instance or makes no change.clone()
Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Remove all data from the object that does not need to be saved by historical versions.copy()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Will copy all detail information of an attachment including : - Content Properties - File Name - File Size - Content Type - And set version is 1boolean
Deprecated, for removal: This API element is subject to removal in a future version.getAttachmentNamed
(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Don't use it directly, use AttachmentManager.getAttachments(page) instead.Deprecated, for removal: This API element is subject to removal in a future version.getAttachmentUrlPath
(Attachment attachment) Deprecated, for removal: This API element is subject to removal in a future version.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).Deprecated, for removal: This API element is subject to removal in a future version.Convenience method that returns the String representation of the content.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Gets theBodyContent
object for this ContentEntityObject.getBodyContent
(BodyType expectedBodyType) Deprecated, for removal: This API element is subject to removal in a future version.Gets theBodyContent
object for this ContentEntityObject or throws an UnsupportedOperationException if its body type is not the same as the suppliedexpectedBodyType
.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Return any comment associated with this attachmentDeprecated, for removal: This API element is subject to removal in a future version.@Nullable ContentEntityObject
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns theContentId
for this entity object, if it implementsContentConvertible
.getContentPermission
(String permissionType) Deprecated, for removal: This API element is subject to removal in a future version.Gives back the first content permission of a specific type.Deprecated, for removal: This API element is subject to removal in a future version.Note, this method does not return ContentPermissions inherited from the Content's ancestry.Deprecated, for removal: This API element is subject to removal in a future version.Return the contents of the attachment as an InputStreamDeprecated, for removal: This API element is subject to removal in a future version.Get the hibernate field for content status, distinguishing only draft/deleted/current status.Deprecated, for removal: This API element is subject to removal in a future version.Get the api layer enum for content status, distinguishing CURRENT/HISTORICAL/DRAFT/TRASHED.@NonNull String
Deprecated, for removal: This API element is subject to removal in a future version.Gets the MIME content-type of this attachment.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the display title.Deprecated, for removal: This API element is subject to removal in a future version.getDownloadPath
(String attachmentPath, boolean addVersionInfo) Deprecated, for removal: This API element is subject to removal in a future version.Returns the download path of the attachment for a given attachmentPath prefix.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the download path without any version info.Deprecated, for removal: This API element is subject to removal in a future version.Returns the download path without any version info or API revision.Deprecated, for removal: This API element is subject to removal in a future version.Gets the ContentEntityObject that backs this piece of content.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the file extension of the attachment.@NonNull String
Deprecated, for removal: This API element is subject to removal in a future version.Gets the filename of this attachment.long
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getGlobalLabels
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are global labelslong
getId()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Get the number of labels that are associated with this object.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Retrieve the labels that are associated with this object.getLabelsForDisplay
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are visible to a particular user, and should be shown in a list of labels.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Get the latest, current version of this versioned object.long
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.@NonNull String
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.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.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.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())Deprecated, for removal: This API element is subject to removal in a future version.Get all the permissions that apply to this content.getPersonalLabels
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are personal labels for a particular userDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.When 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.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getSpace()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getTeamLabels
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are team labels for a particular usergetTitle()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Get trash date if this CEO has been added to the trash since Confluence 7.14.getType()
Deprecated, for removal: This API element is subject to removal in a future version.An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.Deprecated, for removal: This API element is subject to removal in a future version.@Nullable String
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Return the version number of this version of the object.getVersionChildPolicy
(ContentType contentType) Deprecated, for removal: This API element is subject to removal in a future version.Returns the rightVersionChildOwnerPolicy
depending on the passed contentType.Deprecated, for removal: This API element is subject to removal in a future version.getVisibleLabels
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are visible to a particular userboolean
Deprecated, for removal: This API element is subject to removal in a future version.int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
hasPermissions
(String type) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Does this content have "current" status? (non-trashed and non-draft)boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isDraft()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isFavourite
(ConfluenceUser user) Deprecated, for removal: This API element is subject to removal in a future version.Is this object marked as somebody's favourite?boolean
isHidden()
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether this attachment is supposed to be strictly hidden from displaying and searching Hidden attachment is not indexable Hidden attachment manipulation will not trigger external notification eventsboolean
Deprecated, for removal: This API element is subject to removal in a future version.Only the current version of a non-hidden attachment is indexable (until we can deal with old objects in search results) We also don't want to index attachments associated with drafts or global descriptions or hidden attachmentsboolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether this attachment is supposed to be hidden under normal circumstances.boolean
isNew()
Deprecated, for removal: This API element is subject to removal in a future version.Is this the first version of this object?boolean
Deprecated, for removal: This API element is subject to removal in a future version.This object is persistent if the id is not 0.boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Determines whether the Attachment is a user's profile pictureboolean
Deprecated, for removal: This API element is subject to removal in a future version.void
removeAttachment
(Attachment attachment) Deprecated, for removal: This API element is subject to removal in a future version.void
removeComment
(Comment comment) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.This method removes the given ContentPermissionSet from this CEO and disconnects the set from its owner.void
removeCustomContent
(CustomContentEntityObject customContentEntityObject) Deprecated, for removal: This API element is subject to removal in a future version.void
removeLabelling
(Labelling labelling) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
restore()
Deprecated, for removal: This API element is subject to removal in a future version.restores content from the trashvoid
setAttachments
(List<Attachment> attachments) Deprecated, for removal: This API element is subject to removal in a future version.void
setBodyAsString
(String content) Deprecated, for removal: This API element is subject to removal in a future version.Convenience method that sets the content of this ContentEntityObject.void
setBodyContent
(BodyContent bodyContent) Deprecated, for removal: This API element is subject to removal in a future version.Sets theBodyContent
object for this ContentEntityObject.void
setBodyContents
(List<BodyContent> bodyContents) Deprecated, for removal: This API element is subject to removal in a future version.void
setClock
(com.atlassian.core.util.Clock clock) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setComments
(List<Comment> comments) Deprecated, for removal: This API element is subject to removal in a future version.void
setContainer
(ContentEntityObject content) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Initialises theContentProperties
of this ContentEntityObject by performing a deep clone of theContentEntityObject
object's properties.void
setContentStatus
(String contentStatus) Deprecated, for removal: This API element is subject to removal in a future version.Set the hibernate field for content status, distinguishing only draft/deleted/current status.void
setContentType
(@NonNull String contentType) Deprecated, for removal: This API element is subject to removal in a future version.void
setCreationDate
(Date creationDate) Deprecated, for removal: This API element is subject to removal in a future version.void
setCreator
(ConfluenceUser creator) Deprecated, for removal: This API element is subject to removal in a future version.void
setCreatorName
(String creatorName) Deprecated, for removal: This API element is subject to removal in a future version.Set the username of the creatorvoid
setFileName
(@NonNull String fileName) Deprecated, for removal: This API element is subject to removal in a future version.void
setFileSize
(long fileSize) Deprecated, for removal: This API element is subject to removal in a future version.void
setFileStoreId
(String fileStoreId) Deprecated, for removal: This API element is subject to removal in a future version.void
setHidden
(boolean hidden) Deprecated, for removal: This API element is subject to removal in a future version.void
setId
(long id) Deprecated, for removal: This API element is subject to removal in a future version.void
setLastModificationDate
(Date lastModificationDate) Deprecated, for removal: This API element is subject to removal in a future version.void
setLastModifier
(ConfluenceUser lastModifier) Deprecated, for removal: This API element is subject to removal in a future version.void
setLastModifierName
(String lastModifierName) Deprecated, for removal: This API element is subject to removal in a future version.void
setMediaType
(@NonNull String mediaType) Deprecated, for removal: This API element is subject to removal in a future version.void
setMinorEdit
(boolean minorEdit) Deprecated, for removal: This API element is subject to removal in a future version.void
setOriginalVersion
(Versioned originalVersion) Deprecated, for removal: This API element is subject to removal in a future version.Set the current version of this object.void
setOutgoingLinks
(List<OutgoingLink> outgoingLinks) Deprecated, for removal: This API element is subject to removal in a future version.void
setShareId
(String shareId) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setSynchronyRevision
(String synchronyRevision) Deprecated, for removal: This API element is subject to removal in a future version.void
setSynchronyRevisionSource
(String synchronyRevisionSource) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setVersion
(int version) Deprecated, for removal: This API element is subject to removal in a future version.Set the version number of this version of the object.void
setVersionComment
(String versionComment) Deprecated, for removal: This API element is subject to removal in a future version.boolean
sharedAccessAllowed
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.Checks if this draft can be accessed by users other than the creator (shared access)boolean
sharedAccessAllowed
(String shareId) Deprecated, for removal: This API element is subject to removal in a future version.Checks if this draft can be accessed by users other than the creator (shared access)boolean
Deprecated, for removal: This API element is subject to removal in a future version.toString()
Deprecated, for removal: This API element is subject to removal in a future version.void
trash()
Deprecated, for removal: This API element is subject to removal in a future version.places content in trash canboolean
wasCreatedBy
(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class com.atlassian.confluence.pages.Attachment
getDescriptionForMimeType, getImageDetailsDTO, setImageDetailsDTO
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
compareTo, ensureAttachmentBelongsToContent, getAttachmentManager, getContainerContent, replaceContentProperties, restoreDependents, setContainerContent, setOriginalVersionId, toPageContext, trash, trash
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
setLabellings
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getConfluenceRevision
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getRealClass
-
Constructor Details
-
ReadOnlyAttachment
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getLabels
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Labelable
Retrieve the labels that are associated with this object.- Specified by:
getLabels
in interfaceLabelable
- Overrides:
getLabels
in classAbstractLabelableEntityObject
- Returns:
- a list of label instances.
-
getLabelCount
public int getLabelCount()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Labelable
Get the number of labels that are associated with this object.- Specified by:
getLabelCount
in interfaceLabelable
- Overrides:
getLabelCount
in classAbstractLabelableEntityObject
- Returns:
- the number of labels associated with this object.
-
isFavourite
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Labelable
Is this object marked as somebody's favourite?- Specified by:
isFavourite
in interfaceLabelable
- Overrides:
isFavourite
in 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
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLabelableEntityObject
List the labels on this content that are visible to a particular user- Overrides:
getVisibleLabels
in classAbstractLabelableEntityObject
- Parameters:
user
- the user- Returns:
- the labels on this content visible to that user
-
getPersonalLabels
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLabelableEntityObject
List the labels on this content that are personal labels for a particular user- Overrides:
getPersonalLabels
in classAbstractLabelableEntityObject
- Parameters:
user
- the user- Returns:
- the personal labels on this content visible to the user
-
getGlobalLabels
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLabelableEntityObject
List the labels on this content that are global labels- Overrides:
getGlobalLabels
in classAbstractLabelableEntityObject
- Parameters:
user
- the user- Returns:
- the global labels on this content visible to the user
-
getTeamLabels
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLabelableEntityObject
List the labels on this content that are team labels for a particular user- Overrides:
getTeamLabels
in classAbstractLabelableEntityObject
- Parameters:
user
- the user- Returns:
- the team labels on this content visible to the user
-
getLabelsForDisplay
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLabelableEntityObject
List 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:
getLabelsForDisplay
in classAbstractLabelableEntityObject
- Parameters:
user
- the user- Returns:
- the labels on this content visible to that user
-
getLabellings
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getLabellings
in interfaceEditableLabelable
- Overrides:
getLabellings
in classAbstractLabelableEntityObject
-
addLabelling
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
addLabelling
in interfaceEditableLabelable
- Overrides:
addLabelling
in classAbstractLabelableEntityObject
-
removeLabelling
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
removeLabelling
in interfaceEditableLabelable
- Overrides:
removeLabelling
in classAbstractLabelableEntityObject
-
getVersion
public int getVersion()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Return 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:
getVersion
in interfaceVersioned
- Overrides:
getVersion
in classAbstractVersionedEntityObject
- Returns:
- the version number of this version of the object
-
setVersion
public void setVersion(int version) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Set the version number of this version of the object. Only call this method if you are creating a new version.- Specified by:
setVersion
in interfaceVersioned
- Overrides:
setVersion
in classAbstractVersionedEntityObject
- Parameters:
version
- the new version number for this version of the object.
-
isNew
public boolean isNew()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Is this the first version of this object?- Specified by:
isNew
in interfaceVersioned
- Overrides:
isNew
in classAbstractVersionedEntityObject
- Returns:
- true if this is the first version of this versioned object, false if it is a later version.
-
getLatestVersion
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Get 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
ContentEntityObject
so for drafts this method should return theContentEntityObject
the drafts points to if it exists and the draft itself otherwise.- Specified by:
getLatestVersion
in interfaceVersioned
- Overrides:
getLatestVersion
in classAbstractVersionedEntityObject
- Returns:
- the current version of this object.
- See Also:
-
isLatestVersion
public boolean isLatestVersion()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isLatestVersion
in interfaceVersioned
- Overrides:
isLatestVersion
in classAbstractVersionedEntityObject
- Returns:
- true if this is the latest (current) version of the object, false if it is an historical version.
-
getCreatorName
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCreatorName
in classConfluenceEntityObject
- Returns:
- username of the creator, or null if created anonymously
-
getCreator
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCreator
in classConfluenceEntityObject
-
setCreatorName
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ConfluenceEntityObject
Set the username of the creator- Overrides:
setCreatorName
in classConfluenceEntityObject
-
getLastModifierName
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLastModifierName
in classConfluenceEntityObject
- Returns:
- username of the last modifier, or null if none.
-
getLastModifier
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLastModifier
in classConfluenceEntityObject
-
setLastModifierName
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setLastModifierName
in classConfluenceEntityObject
-
setCreator
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setCreator
in classConfluenceEntityObject
-
setLastModifier
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setLastModifier
in classConfluenceEntityObject
-
isPersistent
public boolean isPersistent()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ConfluenceEntityObject
This object is persistent if the id is not 0.- Specified by:
isPersistent
in interfaceEditableLabelable
- Overrides:
isPersistent
in classConfluenceEntityObject
- Returns:
- true if this instance is a persisted label.
-
getTypeEnum
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getTypeEnum
in classContentEntityObject
-
getIdAsString
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getIdAsString
in classContentEntityObject
-
getAttachmentUrlPath
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
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). 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:
getAttachmentUrlPath
in classContentEntityObject
- 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.
-
getTitle
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getTitle
in interfaceEditableLabelable
- Overrides:
getTitle
in classContentEntityObject
-
setTitle
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setTitle
in classContentEntityObject
-
getLowerTitle
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLowerTitle
in classContentEntityObject
-
getDefaultBodyType
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getDefaultBodyType
in classContentEntityObject
-
getBodyContent
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Gets theBodyContent
object 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:
getBodyContent
in classContentEntityObject
- Returns:
- the BodyContent.
- See Also:
-
getBodyContent
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Gets theBodyContent
object 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:
getBodyContent
in classContentEntityObject
- Parameters:
expectedBodyType
- that can be handled by the caller.- Returns:
- the BodyContent.
- See Also:
-
setBodyContent
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Sets theBodyContent
object 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:
setBodyContent
in classContentEntityObject
- Parameters:
bodyContent
- to be set. If the supplied bodyContent or its body arenull
, the list of body contents are cleared.
-
getBodyAsString
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Convenience method that returns the String representation of the content.- Overrides:
getBodyAsString
in classContentEntityObject
- Returns:
- the content.
-
setBodyAsString
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Convenience method that sets the content of this ContentEntityObject.- Overrides:
setBodyAsString
in classContentEntityObject
- Parameters:
content
- the String representation of the content.
-
getBodyContents
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getBodyContents
in classContentEntityObject
-
setBodyContents
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setBodyContents
in classContentEntityObject
-
getOutgoingLinks
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
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())- Overrides:
getOutgoingLinks
in classContentEntityObject
- Returns:
- List of OutgoingLinks
-
setOutgoingLinks
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setOutgoingLinks
in classContentEntityObject
-
addOutgoingLink
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
addOutgoingLink
in classContentEntityObject
-
removeOutgoingLink
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
removeOutgoingLink
in classContentEntityObject
-
setOriginalVersion
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Set 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:
setOriginalVersion
in interfaceVersioned
- Overrides:
setOriginalVersion
in classContentEntityObject
- Parameters:
originalVersion
- the current version of this object.
-
applyChildVersioningPolicy
public void applyChildVersioningPolicy(@Nullable Versioned versionToPromote, Consumer<? super Versioned> dao) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
IfVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)
specifies so, moves content from versionToPromote to this Versioned instance or makes no change.- Specified by:
applyChildVersioningPolicy
in interfaceVersioned
- Overrides:
applyChildVersioningPolicy
in classContentEntityObject
- Parameters:
versionToPromote
- the new version of the current instance that we're getting the children fromdao
- onRemove used to delete dangling contained content
-
getPermissions
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Get all the permissions that apply to this content. Please do not modify the contents of this list!
- Overrides:
getPermissions
in classContentEntityObject
- Returns:
- a list of all the permissions that apply to this content.
-
getContentPermission
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Gives 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:
getContentPermission
in classContentEntityObject
- Returns:
- ContentPermission
-
getContentStatusObject
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Get 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:
getContentStatusObject
in classContentEntityObject
- Returns:
- the API ContentStatus for this content, distinguishing CURRENT/HISTORICAL/DRAFT/TRASHED
- See Also:
-
getContentStatus
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Get 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:
getContentStatus
in classContentEntityObject
- Returns:
- the hibernate field value, distinguishing only
ContentEntityObject.CURRENT
,ContentEntityObject.DRAFT
,ContentEntityObject.DELETED
. - See Also:
-
setContentStatus
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Set 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:
setContentStatus
in classContentEntityObject
- Parameters:
contentStatus
- the hibernate field value,ContentEntityObject.CURRENT
,ContentEntityObject.DRAFT
,ContentEntityObject.DELETED
.- See Also:
-
isCurrent
public boolean isCurrent()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Does 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:
isCurrent
in classContentEntityObject
- Returns:
- true if the content is live, i.e. not trashed and not a draft
- See Also:
-
isDeleted
public boolean isDeleted()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
isDeleted
in classContentEntityObject
-
isDraft
public boolean isDraft()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
isDraft
in classContentEntityObject
-
getSynchronyRevision
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getSynchronyRevision
in classContentEntityObject
- See Also:
-
setSynchronyRevision
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setSynchronyRevision
in classContentEntityObject
- See Also:
-
getSynchronyRevisionSource
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getSynchronyRevisionSource
in classContentEntityObject
- See Also:
-
getTrashDate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Get trash date if this CEO has been added to the trash since Confluence 7.14. For generic cases, useTrashManagerInternal#findTrashDate
- Overrides:
getTrashDate
in classContentEntityObject
- Returns:
- when this content entity was added to the trash or
Optional.empty()
if it was trashed before 7.14
-
setSynchronyRevisionSource
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setSynchronyRevisionSource
in classContentEntityObject
- See Also:
-
getCollaborativeEditingUuid
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCollaborativeEditingUuid
in classContentEntityObject
- See Also:
-
setCollaborativeEditingUuid
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setCollaborativeEditingUuid
in classContentEntityObject
- See Also:
-
isUnpublished
public boolean isUnpublished()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
isUnpublished
in classContentEntityObject
-
wasCreatedBy
public boolean wasCreatedBy(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
wasCreatedBy
in classContentEntityObject
-
trash
public void trash()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
places content in trash can- Overrides:
trash
in classContentEntityObject
-
restore
public void restore()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
restores content from the trash- Overrides:
restore
in classContentEntityObject
-
getAttachments
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Don't use it directly, use AttachmentManager.getAttachments(page) instead.
This also includes trashed items.
- Overrides:
getAttachments
in classContentEntityObject
-
getLatestVersionsOfAttachments
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLatestVersionsOfAttachments
in classContentEntityObject
-
setAttachments
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setAttachments
in classContentEntityObject
-
addAttachment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
addAttachment
in classContentEntityObject
-
removeAttachment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
removeAttachment
in classContentEntityObject
-
getBodyAsStringWithoutMarkup
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getBodyAsStringWithoutMarkup
in classContentEntityObject
-
getExcerpt
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getExcerpt
in classContentEntityObject
-
getAttachmentsUrlPath
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getAttachmentsUrlPath
in classContentEntityObject
-
getAttachmentNamed
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getAttachmentNamed
in classContentEntityObject
-
getVersionComment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getVersionComment
in classContentEntityObject
-
setVersionComment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setVersionComment
in classContentEntityObject
-
isVersionCommentAvailable
public boolean isVersionCommentAvailable()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
isVersionCommentAvailable
in classContentEntityObject
-
getRenderedVersionComment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getRenderedVersionComment
in classContentEntityObject
-
getContentPermissionSet
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Note, this method does not return ContentPermissions inherited from the Content's ancestry.- Overrides:
getContentPermissionSet
in classContentEntityObject
- Returns:
- a set containing
ContentPermission
s of this type, or null if there are no content permissions explicitly set on this ContentEntityObject for the type.
-
hasPermissions
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
hasPermissions
in classContentEntityObject
- Returns:
- true if this content entity object contains any
ContentPermission
s of the type specified
-
hasContentPermissions
public boolean hasContentPermissions()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
hasContentPermissions
in classContentEntityObject
-
addPermission
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Adds 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:
addPermission
in classContentEntityObject
-
removeContentPermissionSet
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
This 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
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getComments
in classContentEntityObject
-
setComments
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setComments
in classContentEntityObject
-
addComment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
addComment
in classContentEntityObject
-
removeComment
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
removeComment
in classContentEntityObject
-
getCustomContent
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCustomContent
in classContentEntityObject
- Returns:
- all custom content that is a child of this CEO.
-
addCustomContent
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
addCustomContent
in classContentEntityObject
-
removeCustomContent
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
removeCustomContent
in classContentEntityObject
-
getEntity
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Content
Gets the ContentEntityObject that backs this piece of content.- Specified by:
getEntity
in interfaceContent
- Overrides:
getEntity
in classContentEntityObject
- Returns:
- the persistent object behind this content
-
getSelector
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getSelector
in interfaceContentConvertible
- Overrides:
getSelector
in 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
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getProperties
in classContentEntityObject
- Returns:
- the content properties associated with this entity
-
setContentPropertiesFrom
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Initialises theContentProperties
of this ContentEntityObject by performing a deep clone of theContentEntityObject
object's properties.- Overrides:
setContentPropertiesFrom
in classContentEntityObject
-
getOriginalVersionId
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getOriginalVersionId
in classContentEntityObject
-
getLatestVersionId
public long getLatestVersionId()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLatestVersionId
in classContentEntityObject
-
setSpace
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setSpace
in classSpaceContentEntityObject
-
convertToHistoricalVersion
public void convertToHistoricalVersion()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
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.
- Specified by:
convertToHistoricalVersion
in interfaceVersioned
- Overrides:
convertToHistoricalVersion
in classSpaceContentEntityObject
-
getSpaceKey
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getSpaceKey
in classSpaceContentEntityObject
-
isInSpace
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
isInSpace
in classSpaceContentEntityObject
-
getFileName
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchableAttachment
Gets the filename of this attachment. If there is no filename, return the empty string. This method should never return null.- Specified by:
getFileName
in interfaceSearchableAttachment
- Overrides:
getFileName
in classAttachment
- Returns:
- the filename of this attachment, or the empty string if there is no filename
-
setFileName
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setFileName
in classAttachment
-
getMediaType
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getMediaType
in classAttachment
-
setMediaType
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setMediaType
in classAttachment
-
getContentType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchableAttachment
Gets the MIME content-type of this attachment. If there is no content-type, return "application/x-unknown". Should never return null.- Specified by:
getContentType
in interfaceSearchableAttachment
- Overrides:
getContentType
in classAttachment
- Returns:
- the MIME content-type of the attachment, or "application/x-unknown" if the MIME type is unknown
-
setContentType
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setContentType
in classAttachment
-
getContainer
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getContainer
in interfaceContained<ContentEntityObject>
- Overrides:
getContainer
in classAttachment
- Returns:
- the owner of this content object. Can be null.
-
setContainer
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setContainer
in classAttachment
-
getComment
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchableAttachment
Return any comment associated with this attachment- Specified by:
getComment
in interfaceSearchableAttachment
- Overrides:
getComment
in classAttachment
-
isMinorEdit
public boolean isMinorEdit()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Indicates whether this attachment is supposed to be hidden under normal circumstances. At the moment this is only used to avoid sending notifications and to hide them in the activity stream. Future usages should be hiding them by default in the attachment macro output- Overrides:
isMinorEdit
in classAttachment
- Returns:
- true, if the attachment is hidden
-
setMinorEdit
public void setMinorEdit(boolean minorEdit) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setMinorEdit
in classAttachment
-
getFileStoreId
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getFileStoreId
in classAttachment
- Returns:
- FileStore ID of the binary data of this attachment
-
setFileStoreId
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setFileStoreId
in classAttachment
-
isHidden
public boolean isHidden()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Indicates whether this attachment is supposed to be strictly hidden from displaying and searching Hidden attachment is not indexable Hidden attachment manipulation will not trigger external notification events- Overrides:
isHidden
in classAttachment
- Returns:
- true, if the attachment is hidden
-
setHidden
public void setHidden(boolean hidden) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setHidden
in classAttachment
-
getFileSize
public long getFileSize()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getFileSize
in classAttachment
- Returns:
- The size (in bytes) of the attachment's raw binary data
-
setFileSize
public void setFileSize(long fileSize) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setFileSize
in classAttachment
-
getNiceFileSize
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getNiceFileSize
in interfaceSearchableAttachment
- Overrides:
getNiceFileSize
in classAttachment
-
getNiceType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getNiceType
in interfaceSearchableAttachment
- Overrides:
getNiceType
in classAttachment
- Returns:
- A nice type for this file if possible (eg "PDF" or "Word") - or null if no nice type can be recognised
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
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.
- Specified by:
getType
in interfaceContentTypeAware
- Overrides:
getType
in classAttachment
- Returns:
- the content type
-
getDisplayTitle
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
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.- Specified by:
getDisplayTitle
in interfaceAddressable
- Overrides:
getDisplayTitle
in classAttachment
- Returns:
- the display title
-
getUrlPath
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getUrlPath
in interfaceAddressable
- Overrides:
getUrlPath
in classAttachment
-
getSearchableDependants
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Searchable
When 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.- Specified by:
getSearchableDependants
in interfaceSearchable
- Overrides:
getSearchableDependants
in classAttachment
-
isUserProfilePicture
public boolean isUserProfilePicture()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Determines whether the Attachment is a user's profile picture- Overrides:
isUserProfilePicture
in classAttachment
- Returns:
- true if it is attached to a PersonalInformation object and has the correct comment
-
isIndexable
public boolean isIndexable()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Only the current version of a non-hidden attachment is indexable (until we can deal with old objects in search results) We also don't want to index attachments associated with drafts or global descriptions or hidden attachments- Specified by:
isIndexable
in interfaceSearchable
- Overrides:
isIndexable
in classAttachment
-
getDownloadPath
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDownloadPath
in interfaceSearchableAttachment
- Overrides:
getDownloadPath
in classAttachment
-
getDownloadPathWithoutVersion
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Returns the download path without any version info.- Overrides:
getDownloadPathWithoutVersion
in classAttachment
-
getDownloadPathWithoutVersionOrApiRevision
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Returns the download path without any version info or API revision.- Overrides:
getDownloadPathWithoutVersionOrApiRevision
in classAttachment
-
getDownloadPath
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Returns the download path of the attachment for a given attachmentPath prefix. It basically appends the filename and some meta info to form the path.- Overrides:
getDownloadPath
in classAttachment
-
getDownloadPathWithoutEncoding
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getDownloadPathWithoutEncoding
in classAttachment
-
getExportPath
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getExportPath
in classAttachment
-
getExportPathForThumbnail
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getExportPathForThumbnail
in classAttachment
-
getContentsAsStream
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchableAttachment
Return the contents of the attachment as an InputStream- Specified by:
getContentsAsStream
in interfaceSearchableAttachment
- Overrides:
getContentsAsStream
in classAttachment
- Returns:
- an InputStream set at the start of the attachment's contents.
- Throws:
IOException
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
toString
in classAttachment
-
getNameForComparison
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
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.- Overrides:
getNameForComparison
in classAttachment
-
equals
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
equals
in classAttachment
-
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
hashCode
in classAttachment
-
getFileExtension
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Returns the file extension of the attachment. If there is no extension, an empty string is returned.- Overrides:
getFileExtension
in classAttachment
- Returns:
- the file extension of the attachment in lower case
-
getSpace
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getSpace
in interfaceSpaced
- Overrides:
getSpace
in classAttachment
- Returns:
- the space of the owning content if it can be associated with a space (i.e. of type
Spaced
), or null otherwise.
-
getLinkWikiMarkup
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getLinkWikiMarkup
in interfaceHasLinkWikiMarkup
- Overrides:
getLinkWikiMarkup
in classAttachment
- Returns:
- the wiki markup used to link to this content
-
clone
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
clone
in classAttachment
-
copy
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
copy
in classAttachment
-
getVersionChildPolicy
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Versioned
Returns the rightVersionChildOwnerPolicy
depending on the passed contentType. By default,VersionChildOwnerPolicy.currentVersion
is returnedRight now, this is only enforced for children with content type Attachment or Comment
- Specified by:
getVersionChildPolicy
in interfaceVersioned
- Overrides:
getVersionChildPolicy
in classAttachment
-
getContentTypeObject
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getContentTypeObject
in interfaceContentConvertible
- Overrides:
getContentTypeObject
in classAttachment
- Returns:
- the api ContentType that this ContentConvertible converts to
-
getContentId
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContentEntityObject
Returns theContentId
for this entity object, if it implementsContentConvertible
.Subclasses implementing ContentConvertible must override this method.
- Specified by:
getContentId
in interfaceContentConvertible
- Overrides:
getContentId
in classAttachment
- Returns:
- the ContentId representation of this object's id
-
shouldConvertToContent
public boolean shouldConvertToContent()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
shouldConvertToContent
in interfaceContentConvertible
- Overrides:
shouldConvertToContent
in classAttachment
- Returns:
- true if the implementer wants to be part of the core API (default value), false otherwise
-
copyLatestVersion
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Attachment
Will copy all detail information of an attachment including : - Content Properties - File Name - File Size - Content Type - And set version is 1NOTE: it won't copy content history
- Overrides:
copyLatestVersion
in classAttachment
- Returns:
- a copy instance
-
getId
public long getId()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getId
in interfaceAddressable
- Specified by:
getId
in interfaceEditableLabelable
- Specified by:
getId
in interfaceSearchable
- Overrides:
getId
in classcom.atlassian.core.bean.EntityObject
-
setId
public void setId(long id) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setId
in classcom.atlassian.core.bean.EntityObject
-
getCreationDate
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCreationDate
in classAnnotatedEntityObject
-
setCreationDate
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setCreationDate
in classcom.atlassian.core.bean.EntityObject
-
getLastModificationDate
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getLastModificationDate
in classAnnotatedEntityObject
-
setLastModificationDate
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setLastModificationDate
in classcom.atlassian.core.bean.EntityObject
-
setClock
public void setClock(com.atlassian.core.util.Clock clock) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setClock
in classcom.atlassian.core.bean.EntityObject
-
getCurrentDate
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCurrentDate
in classcom.atlassian.core.bean.EntityObject
-
Attachment
directly.