public class RemoteAttachmentServiceImpl extends AbstractRemoteService<AttachmentService> implements RemoteAttachmentService
Modifier and Type | Class and Description |
---|---|
class |
RemoteAttachmentServiceImpl.RemoteAttachmentFinderImpl |
RemoteAttachmentService.RemoteAttachmentFinder
Constructor and Description |
---|
RemoteAttachmentServiceImpl(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor) |
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<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. |
AttachmentService.Validator |
validator()
Remote validation not supported
|
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, deleteFuture, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuture
public RemoteAttachmentServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
public com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId contentId, Collection<AttachmentUpload> uploads) throws ServiceException
RemoteAttachmentService
Content
.addAttachments
in interface RemoteAttachmentService
contentId
- the id of the content to attach touploads
- the attachments being uploadedServiceException
public RemoteAttachmentService.RemoteAttachmentFinder find(Expansion... expansions)
find
in interface RemoteAttachmentService
public com.atlassian.util.concurrent.Promise<Content> update(Content attachment) throws ServiceException
RemoteAttachmentService
Content
instance.
This method can be used to update the container, filename, media-type and comment of an Attachment.
update
in interface RemoteAttachmentService
attachment
- the attachment to update, must include an idServiceException
public com.atlassian.util.concurrent.Promise<Content> updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
RemoteAttachmentService
Content
instance.updateData
in interface RemoteAttachmentService
attachmentId
- the id of the attachment to updateupload
- the new content of the AttachmentServiceException
public com.atlassian.util.concurrent.Promise<Void> delete(Content attachmentContent) throws ServiceException
RemoteAttachmentService
delete
in interface RemoteAttachmentService
attachmentContent
- the content to removeServiceException
- if the content cannot be found, or cannot be deletedpublic AttachmentService.Validator validator()
UnsupportedOperationException
Copyright © 2003–2016 Atlassian. All rights reserved.