public interface RemoteAttachmentService
AttachmentService implementation that communicates with Confluence remotely using the Confluence REST API.
Provides future returning equivalents for the methods in AttachmentService.| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Future<PageResponse<Content>> |
addAttachments(ContentId contentId,
java.util.Collection<AttachmentUpload> uploads)
Add one or more attachments to a piece of
Content. |
java.util.concurrent.Future<java.lang.Boolean> |
canCreateAttachments(ContentId contentId)
Checks if the user is permitted to add attachments to the given content
|
java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> |
findByContainerAndFilename(ContentId containerId,
java.lang.String filename,
Expansion... expansions)
Locates a single Attachment given the id of its container Content and its file name.
|
java.util.concurrent.Future<PageResponse<Content>> |
getAttachments(ContentId contentId,
PageRequest pageRequest,
AttachmentFilter filter,
Expansion... expansions)
Get a page of attachments under the
Content with the specified id. |
java.util.concurrent.Future<Content> |
updateData(ContentId attachmentId,
AttachmentUpload upload)
Updates the data part of an Attachment
Content instance. |
java.util.concurrent.Future<PageResponse<Content>> addAttachments(ContentId contentId, java.util.Collection<AttachmentUpload> uploads) throws ServiceException
Content.contentId - the id of the content to attach touploads - the attachments being uploadedServiceExceptionjava.util.concurrent.Future<java.lang.Boolean> canCreateAttachments(ContentId contentId)
contentId - the id of the content to attach tojava.util.concurrent.Future<PageResponse<Content>> getAttachments(ContentId contentId, PageRequest pageRequest, AttachmentFilter filter, Expansion... expansions) throws ServiceException
Content with the specified id.contentId - id of the Content that contains the attachments.pageRequest - - a pageRequest indicating how much content to retrieve.filter - - a filter to apply to the found Attachmentsexpansions - the expansions to apply to each Attachment in the returned pageServiceExceptionjava.util.concurrent.Future<com.atlassian.fugue.Option<Content>> findByContainerAndFilename(ContentId containerId, java.lang.String filename, Expansion... expansions) throws ServiceException
containerId - the id of the content containing the attachmentfilename - the name of the attachment fileexpansions - expansions to return on the Attachment contentServiceExceptionjava.util.concurrent.Future<Content> updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
Content instance.attachmentId - the id of the attachment to updateupload - the new content of the AttachmentServiceExceptionCopyright © 2003-2014 Atlassian. All Rights Reserved.