Interface RestAttachmentManager
-
- All Known Implementing Classes:
DefaultRestAttachmentManager
public interface RestAttachmentManager
Responsible for managingAttachmentEntity
objects.This manager responsible for conversion from Confluence's API objects (eg
Attachment
, to a REST levelAttachmentEntity
. It also checks if user has permissions to view the attachments.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getAttachmentEntity
AttachmentEntity getAttachmentEntity(Long attachmentId)
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- Parameters:
attachmentId
- the id of the attahcment to retrieve- Returns:
- the converted attachment object or null if not permitted or doesn't exist
-
convertToAttachmentEntity
AttachmentEntity convertToAttachmentEntity(Attachment attachment)
Convert a Confluence model object into its REST representation.- Parameters:
attachment
-- Returns:
- the equivalent unexpanded ContentEntity
-
createAttachmentEntityListForContent
AttachmentEntityList createAttachmentEntityListForContent(ContentEntityObject object)
Create aAttachmentEntityList
object for the given ContentEntityObject- Parameters:
object
-- Returns:
-
-