Class DefaultRestAttachmentManager
java.lang.Object
com.atlassian.confluence.plugins.rest.manager.DefaultRestAttachmentManager
- All Implemented Interfaces:
RestAttachmentManager
-
Constructor Summary
ConstructorDescriptionDefaultRestAttachmentManager
(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityFactory dateEntityFactory) -
Method Summary
Modifier and TypeMethodDescriptionconvertToAttachmentEntity
(Attachment attachment) Convert a Confluence model object into its REST representation.Create aAttachmentEntityList
object for the given ContentEntityObjectgetAttachmentEntity
(Long attachmentId) Gets theAttachmentEntity
object for the given id.
-
Constructor Details
-
DefaultRestAttachmentManager
public DefaultRestAttachmentManager(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityFactory dateEntityFactory)
-
-
Method Details
-
convertToAttachmentEntity
Description copied from interface:RestAttachmentManager
Convert a Confluence model object into its REST representation.- Specified by:
convertToAttachmentEntity
in interfaceRestAttachmentManager
- Returns:
- the equivalent unexpanded ContentEntity
-
getAttachmentEntity
Description copied from interface:RestAttachmentManager
Gets theAttachmentEntity
object for the given id. A convenience method that packages up retrieving the Confluence attachment and converting it to a REST object.null
is returned if the current user is not permitted to view the attachment or if no attachment object can be found for the given id- Specified by:
getAttachmentEntity
in interfaceRestAttachmentManager
- Parameters:
attachmentId
- the id of the attahcment to retrieve- Returns:
- the converted attachment object or null if not permitted or doesn't exist
-
createAttachmentEntityListForContent
Description copied from interface:RestAttachmentManager
Create aAttachmentEntityList
object for the given ContentEntityObject- Specified by:
createAttachmentEntityListForContent
in interfaceRestAttachmentManager
- Returns:
-