Interface RemoteAttachmentService
-
- All Known Implementing Classes:
RemoteAttachmentServiceImpl
public interface RemoteAttachmentService
*AttachmentService
implementation that communicates with Confluence remotely using the Confluence REST API.Provides future returning equivalents for the methods in AttachmentService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RemoteAttachmentService.RemoteAttachmentFinder
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<PageResponse<Content>>
addAttachments(ContentId contentId, ContentStatus status, Collection<AttachmentUpload> uploads)
Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<PageResponse<Content>>
addAttachments(ContentId containerId, ContentStatus containerStatus, Collection<AttachmentUpload> uploads, boolean allowDuplicated, Expansions expansions)
Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<PageResponse<Content>>
addAttachments(ContentId contentId, Collection<AttachmentUpload> uploads)
Deprecated.since 7.0.1.CompletionStage<PageResponse<Content>>
addAttachmentsCompletionStage(ContentId contentId, ContentStatus status, Collection<AttachmentUpload> uploads)
CompletionStage<PageResponse<Content>>
addAttachmentsCompletionStage(ContentId containerId, ContentStatus containerStatus, Collection<AttachmentUpload> uploads, boolean allowDuplicated, Expansions expansions)
CompletionStage<PageResponse<Content>>
addAttachmentsCompletionStage(ContentId contentId, Collection<AttachmentUpload> uploads)
Add one or more attachments to a piece ofContent
.com.atlassian.util.concurrent.Promise<Void>
delete(Content attachmentContent)
Deprecated.since 7.0.1.CompletionStage<Void>
deleteCompletionStage(Content attachmentContent)
Removes an Attachment from the system.RemoteAttachmentService.RemoteAttachmentFinder
find(Expansion... expansions)
com.atlassian.util.concurrent.Promise<Content>
update(Content attachment)
Deprecated.since 7.0.1.CompletionStage<Content>
updateCompletionStage(Content attachment)
Updates the non-data parts of an AttachmentContent
instance.com.atlassian.util.concurrent.Promise<Content>
updateData(ContentId attachmentId, AttachmentUpload upload)
Deprecated.since 7.0.1.CompletionStage<Content>
updateDataCompletionStage(ContentId attachmentId, AttachmentUpload upload)
Updates the data part of an AttachmentContent
instance.
-
-
-
Method Detail
-
addAttachments
@Deprecated com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId contentId, Collection<AttachmentUpload> uploads) throws ServiceException
Deprecated.since 7.0.1. UseaddAttachmentsCompletionStage(ContentId, Collection)
instead.- Throws:
ServiceException
-
addAttachments
@Deprecated com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId contentId, ContentStatus status, Collection<AttachmentUpload> uploads) throws ServiceException
Deprecated.since 7.0.1. UseaddAttachmentsCompletionStage(ContentId, ContentStatus, Collection)
instead.- Throws:
ServiceException
-
addAttachments
@Deprecated com.atlassian.util.concurrent.Promise<PageResponse<Content>> addAttachments(ContentId containerId, ContentStatus containerStatus, Collection<AttachmentUpload> uploads, boolean allowDuplicated, Expansions expansions) throws ServiceException
Deprecated.since 7.0.1. UseaddAttachmentsCompletionStage(ContentId, ContentStatus, Collection, boolean, Expansions)
instead.- Throws:
ServiceException
-
addAttachmentsCompletionStage
CompletionStage<PageResponse<Content>> addAttachmentsCompletionStage(ContentId contentId, Collection<AttachmentUpload> uploads) throws ServiceException
Add one or more attachments to a piece ofContent
.- Parameters:
contentId
- the id of the content to attach touploads
- the attachments being uploaded- Returns:
- the attachments added
- Throws:
ServiceException
- Since:
- 7.0.1
-
addAttachmentsCompletionStage
CompletionStage<PageResponse<Content>> addAttachmentsCompletionStage(ContentId contentId, ContentStatus status, Collection<AttachmentUpload> uploads) throws ServiceException
- Throws:
ServiceException
- Since:
- 7.0.1
-
addAttachmentsCompletionStage
CompletionStage<PageResponse<Content>> addAttachmentsCompletionStage(ContentId containerId, ContentStatus containerStatus, Collection<AttachmentUpload> uploads, boolean allowDuplicated, Expansions expansions) throws ServiceException
- Throws:
ServiceException
- Since:
- 7.0.1
-
find
RemoteAttachmentService.RemoteAttachmentFinder find(Expansion... expansions)
-
update
@Deprecated com.atlassian.util.concurrent.Promise<Content> update(Content attachment) throws ServiceException
Deprecated.since 7.0.1. UseupdateCompletionStage(Content)
instead.Updates the non-data parts of an AttachmentContent
instance.This method can be used to update the container, filename, media-type and comment of an Attachment.
- Parameters:
attachment
- the attachment to update, must include an id- Returns:
- the updated attachment as stored in the database
- Throws:
ServiceException
-
updateData
@Deprecated com.atlassian.util.concurrent.Promise<Content> updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
Deprecated.since 7.0.1. UseupdateDataCompletionStage(ContentId, AttachmentUpload)
instead.Updates the data part of an AttachmentContent
instance.- Parameters:
attachmentId
- the id of the attachment to updateupload
- the new content of the Attachment- Returns:
- the updated attachment as stored in the database
- Throws:
ServiceException
-
delete
@Deprecated com.atlassian.util.concurrent.Promise<Void> delete(Content attachmentContent) throws ServiceException
Deprecated.since 7.0.1. UsedeleteCompletionStage(Content)
instead.Removes an Attachment from the system.- Parameters:
attachmentContent
- the content to remove- Throws:
ServiceException
- if the content cannot be found, or cannot be deleted
-
updateCompletionStage
CompletionStage<Content> updateCompletionStage(Content attachment) throws ServiceException
Updates the non-data parts of an AttachmentContent
instance.This method can be used to update the container, filename, media-type and comment of an Attachment.
- Parameters:
attachment
- the attachment to update, must include an id- Returns:
- the updated attachment as stored in the database
- Throws:
ServiceException
- Since:
- 7.0.1
-
updateDataCompletionStage
CompletionStage<Content> updateDataCompletionStage(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
Updates the data part of an AttachmentContent
instance.- Parameters:
attachmentId
- the id of the attachment to updateupload
- the new content of the Attachment- Returns:
- the updated attachment as stored in the database
- Throws:
ServiceException
- Since:
- 7.0.1
-
deleteCompletionStage
CompletionStage<Void> deleteCompletionStage(Content attachmentContent) throws ServiceException
Removes an Attachment from the system.- Parameters:
attachmentContent
- the content to remove- Throws:
ServiceException
- if the content cannot be found, or cannot be deleted- Since:
- 7.0.1
-
-