com.atlassian.confluence.plugins.rest.manager
Class DefaultRestAttachmentManager

java.lang.Object
  extended by com.atlassian.confluence.plugins.rest.manager.DefaultRestAttachmentManager
All Implemented Interfaces:
RestAttachmentManager

public class DefaultRestAttachmentManager
extends Object
implements RestAttachmentManager


Constructor Summary
DefaultRestAttachmentManager(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityFactory dateEntityFactory)
           
DefaultRestAttachmentManager(AttachmentManager attachmentManager, PermissionManager permissionManager, SettingsManager settingsManager, ThumbnailManager thumbnailManager, DateEntityHelper dateEntityHelper)
          Deprecated. since 4.3. DateEntityFactory replaces DateEntityHelper.
 
Method Summary
 AttachmentEntity convertToAttachmentEntity(Attachment attachment)
          Convert a Confluence model object into its REST representation.
 AttachmentEntityList createAttachmentEntityListForContent(ContentEntityObject object)
          Create a AttachmentEntityList object for the given ContentEntityObject
 AttachmentEntity getAttachmentEntity(Long attachmentId)
          Gets the AttachmentEntity object for the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRestAttachmentManager

@Deprecated
public DefaultRestAttachmentManager(AttachmentManager attachmentManager,
                                               PermissionManager permissionManager,
                                               SettingsManager settingsManager,
                                               ThumbnailManager thumbnailManager,
                                               DateEntityHelper dateEntityHelper)
Deprecated. since 4.3. DateEntityFactory replaces DateEntityHelper.

Parameters:
attachmentManager -
permissionManager -
settingsManager -
thumbnailManager -
dateEntityHelper -

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 interface RestAttachmentManager
Returns:
the equivalent unexpanded ContentEntity

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–2015 Atlassian. All rights reserved.