public interface AttachmentService
Content objects.| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | AttachmentService.AttachmentFinder | 
| static interface  | AttachmentService.ValidatorProvides methods for validating the actions on the AttachmentService | 
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | COMMENT_METADATA_KEYAttachment Comments are stored in the  Contentmetadata as the "comment" entry. | 
| static java.lang.String | MEDIA_TYPE_METADATA_KEYAttachment Media Type is stored in the  Contentmetadata as the "mediaType" entry. | 
| Modifier and Type | Method and Description | 
|---|---|
| PageResponse<Content> | addAttachments(ContentId containerId,
              java.util.Collection<AttachmentUpload> uploads)Add one or more attachments to a piece of  Content. | 
| void | delete(Content attachment)Removes an Attachment from the system. | 
| AttachmentService.AttachmentFinder | find(Expansion... expansions) | 
| Content | update(Content attachment)Updates the non-data parts of an Attachment  Contentinstance. | 
| Content | updateData(ContentId attachmentId,
          AttachmentUpload upload)Updates the data part of an Attachment  Contentinstance. | 
| AttachmentService.Validator | validator()Provides a validator for validating actions on the AttachmentService and checking permissions
 related to attachments on Content | 
static final java.lang.String COMMENT_METADATA_KEY
Content metadata as the "comment" entry.static final java.lang.String MEDIA_TYPE_METADATA_KEY
Content metadata as the "mediaType" entry.PageResponse<Content> addAttachments(ContentId containerId, java.util.Collection<AttachmentUpload> uploads) throws ServiceException
Content.containerId - the id of the content to attach touploads - the attachments being uploadedServiceExceptionAttachmentService.AttachmentFinder find(Expansion... expansions)
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 idServiceExceptionContent updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
Content instance.attachmentId - the id of the attachment to updateupload - the new content of the AttachmentServiceExceptionAttachmentService.Validator validator()
void delete(Content attachment) throws ServiceException
attachment - the content to removeServiceException - if the content cannot be found, or cannot be deletedCopyright © 2003-2014 Atlassian. All Rights Reserved.