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 | Interface and Description |
---|---|
static interface |
RemoteAttachmentService.RemoteAttachmentFinder |
Modifier and Type | Method and Description |
---|---|
com.atlassian.util.concurrent.Promise<PageResponse<Content>> |
addAttachments(ContentId contentId,
Collection<AttachmentUpload> uploads)
Add one or more attachments to a piece of
Content . |
com.atlassian.util.concurrent.Promise<PageResponse<Content>> |
addAttachments(ContentId contentId,
ContentStatus status,
Collection<AttachmentUpload> uploads) |
com.atlassian.util.concurrent.Promise<Void> |
delete(Content attachmentContent)
Removes an Attachment from the system.
|
RemoteAttachmentService.RemoteAttachmentFinder |
find(Expansion... expansions) |
com.atlassian.util.concurrent.Promise<Content> |
update(Content attachment)
Updates the non-data parts of an Attachment
Content instance. |
com.atlassian.util.concurrent.Promise<Content> |
updateData(ContentId attachmentId,
AttachmentUpload upload)
Updates the data part of an Attachment
Content instance. |
com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId contentId, Collection<AttachmentUpload> uploads) throws ServiceException
Content
.contentId
- the id of the content to attach touploads
- the attachments being uploadedServiceException
com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId contentId, ContentStatus status, Collection<AttachmentUpload> uploads) throws ServiceException
ServiceException
RemoteAttachmentService.RemoteAttachmentFinder find(Expansion... expansions)
com.atlassian.util.concurrent.Promise<Content> update(Content attachment) throws ServiceException
Content
instance.
This method can be used to update the container, filename, media-type and comment of an Attachment.
attachment
- the attachment to update, must include an idServiceException
com.atlassian.util.concurrent.Promise<Content> updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
Content
instance.attachmentId
- the id of the attachment to updateupload
- the new content of the AttachmentServiceException
com.atlassian.util.concurrent.Promise<Void> delete(Content attachmentContent) throws ServiceException
attachmentContent
- the content to removeServiceException
- if the content cannot be found, or cannot be deletedCopyright © 2003–2017 Atlassian. All rights reserved.