Class DefaultRestAttachmentManager
- java.lang.Object
-
- com.atlassian.confluence.plugins.rest.manager.DefaultRestAttachmentManager
-
- All Implemented Interfaces:
RestAttachmentManager
public class DefaultRestAttachmentManager extends Object implements RestAttachmentManager
-
-
Constructor Summary
Constructors Constructor Description DefaultRestAttachmentManager(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityFactory dateEntityFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentEntity
convertToAttachmentEntity(Attachment attachment)
Convert a Confluence model object into its REST representation.AttachmentEntityList
createAttachmentEntityListForContent(ContentEntityObject object)
Create aAttachmentEntityList
object for the given ContentEntityObjectAttachmentEntity
getAttachmentEntity(Long attachmentId)
Gets theAttachmentEntity
object for the given id.
-
-
-
Constructor Detail
-
DefaultRestAttachmentManager
public DefaultRestAttachmentManager(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityFactory dateEntityFactory)
-
-
Method Detail
-
convertToAttachmentEntity
public AttachmentEntity convertToAttachmentEntity(Attachment attachment)
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
public AttachmentEntity getAttachmentEntity(Long attachmentId)
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
public AttachmentEntityList createAttachmentEntityListForContent(ContentEntityObject object)
Description copied from interface:RestAttachmentManager
Create aAttachmentEntityList
object for the given ContentEntityObject- Specified by:
createAttachmentEntityListForContent
in interfaceRestAttachmentManager
- Returns:
-
-