com.atlassian.confluence.plugins.rest.manager
Class DefaultRestAttachmentManager
java.lang.Object
com.atlassian.confluence.plugins.rest.manager.DefaultRestAttachmentManager
- All Implemented Interfaces:
- RestAttachmentManager
public class DefaultRestAttachmentManager
- extends Object
- implements RestAttachmentManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRestAttachmentManager
public DefaultRestAttachmentManager(AttachmentManager attachmentManager,
PermissionManager permissionManager,
SettingsManager settingsManager,
ThumbnailManager thumbnailManager,
DateEntityHelper dateEntityHelper)
convertToAttachmentEntity
public AttachmentEntity convertToAttachmentEntity(Attachment attachment)
- Description copied from interface:
RestAttachmentManager
- Convert a Confluence model object into its REST representation.
- Specified by:
convertToAttachmentEntity
in interface RestAttachmentManager
- Returns:
- the equivalent unexpanded ContentEntity
makeThumbnailLink
public static com.atlassian.plugins.rest.common.Link makeThumbnailLink(Attachment attachment,
ThumbnailManager thumbnailManager,
SettingsManager settingsManager)
getAttachmentEntity
public AttachmentEntity getAttachmentEntity(Long attachmentId)
- Description copied from interface:
RestAttachmentManager
- Gets the
AttachmentEntity
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 interface RestAttachmentManager
- 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 a
AttachmentEntityList
object for the given ContentEntityObject
- Specified by:
createAttachmentEntityListForContent
in interface RestAttachmentManager
- Returns:
Copyright © 2003-2011 Atlassian. All Rights Reserved.