@PublicApi @ParametersAreNonnullByDefault public interface TemporaryWebAttachmentManager
Modifier and Type | Method and Description |
---|---|
void |
clearTemporaryAttachmentsByFormToken(String formToken)
Removes all remaining temporary attachments which were created with given form token.
|
AttachmentsBulkOperationResult<ChangeItemBean> |
convertTemporaryAttachments(ApplicationUser user,
Issue issue,
List<String> temporaryAttachmentsIds)
Converts temporary attachments created by
createTemporaryWebAttachment(java.io.InputStream, java.lang.String, java.lang.String, long, io.atlassian.fugue.Either<com.atlassian.jira.issue.Issue, com.atlassian.jira.project.Project>, java.lang.String, com.atlassian.jira.user.ApplicationUser)
into real attachments. |
io.atlassian.fugue.Either<AttachmentError,TemporaryWebAttachment> |
createTemporaryWebAttachment(InputStream stream,
String fileName,
String contentType,
long size,
io.atlassian.fugue.Either<Issue,Project> target,
String formToken,
ApplicationUser user)
Creates new temporary attachment that may be later converted into real attachment.
|
io.atlassian.fugue.Option<TemporaryWebAttachment> |
getTemporaryWebAttachment(String temporaryAttachmentId)
Gets temporary web attachment by string ID, which was produced by
TemporaryWebAttachment.getStringId() . |
Collection<TemporaryWebAttachment> |
getTemporaryWebAttachmentsByFormToken(String formToken)
Gets all temporary attachments associated with given form token.
|
void |
updateTemporaryWebAttachment(String temporaryAttachmentId,
TemporaryWebAttachment updated)
Updates existing temporary attachment object to new state.
|
io.atlassian.fugue.Either<AttachmentError,TemporaryWebAttachment> createTemporaryWebAttachment(InputStream stream, String fileName, String contentType, long size, io.atlassian.fugue.Either<Issue,Project> target, String formToken, @Nullable ApplicationUser user)
getTemporaryWebAttachment(java.lang.String)
.stream
- attachment contentfileName
- name of attachment filecontentType
- content typesize
- size of attachmenttarget
- target for attachment - issue or project (in case if temporary attachment will be converted into
real attachment during issue creation)formToken
- token representing attachment group (usually a token for a web form)user
- the author of attachmentio.atlassian.fugue.Option<TemporaryWebAttachment> getTemporaryWebAttachment(String temporaryAttachmentId)
TemporaryWebAttachment.getStringId()
.temporaryAttachmentId
- string attachment IDCollection<TemporaryWebAttachment> getTemporaryWebAttachmentsByFormToken(String formToken)
formToken
- temporary attachments group token used during temporary attachments creationTemporaryWebAttachment
objectsvoid updateTemporaryWebAttachment(String temporaryAttachmentId, TemporaryWebAttachment updated)
temporaryAttachmentId
- string id of temporary attachment to updateupdated
- object that holds new values for the temporary attachmentNoSuchElementException
AttachmentsBulkOperationResult<ChangeItemBean> convertTemporaryAttachments(@Nullable ApplicationUser user, Issue issue, List<String> temporaryAttachmentsIds)
createTemporaryWebAttachment(java.io.InputStream, java.lang.String, java.lang.String, long, io.atlassian.fugue.Either<com.atlassian.jira.issue.Issue, com.atlassian.jira.project.Project>, java.lang.String, com.atlassian.jira.user.ApplicationUser)
into real attachments.user
- user which is performing conversionissue
- target issue for new attachmentstemporaryAttachmentsIds
- temporary attachments string IDs.void clearTemporaryAttachmentsByFormToken(String formToken)
formToken
- form toke used to identify temporary attachments to removeCopyright © 2002-2021 Atlassian. All Rights Reserved.