public class RemoteAttachmentServiceImpl extends AbstractRemoteService<AttachmentService> implements RemoteAttachmentService
| Constructor and Description |
|---|
RemoteAttachmentServiceImpl(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor) |
| 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. |
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, getFutureGenericCollection, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuturepublic RemoteAttachmentServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
public java.util.concurrent.Future<PageResponse<Content>> addAttachments(ContentId contentId, java.util.Collection<AttachmentUpload> uploads) throws ServiceException
RemoteAttachmentServiceContent.addAttachments in interface RemoteAttachmentServicecontentId - the id of the content to attach touploads - the attachments being uploadedServiceExceptionpublic java.util.concurrent.Future<java.lang.Boolean> canCreateAttachments(ContentId contentId)
RemoteAttachmentServicecanCreateAttachments in interface RemoteAttachmentServicecontentId - the id of the content to attach topublic java.util.concurrent.Future<PageResponse<Content>> getAttachments(ContentId contentId, PageRequest pageRequest, AttachmentFilter filter, Expansion... expansions) throws ServiceException
RemoteAttachmentServiceContent with the specified id.getAttachments in interface RemoteAttachmentServicecontentId - 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 pageServiceExceptionpublic java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> findByContainerAndFilename(ContentId containerId, java.lang.String filename, Expansion... expansions) throws ServiceException
RemoteAttachmentServicefindByContainerAndFilename in interface RemoteAttachmentServicecontainerId - the id of the content containing the attachmentfilename - the name of the attachment fileexpansions - expansions to return on the Attachment contentServiceExceptionpublic java.util.concurrent.Future<Content> updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
RemoteAttachmentServiceContent instance.updateData in interface RemoteAttachmentServiceattachmentId - the id of the attachment to updateupload - the new content of the AttachmentServiceExceptionCopyright © 2003-2014 Atlassian. All Rights Reserved.