Interface TemporaryWebAttachmentsMonitor
- All Known Implementing Classes:
DefaultTemporaryWebAttachmentsMonitor
@Internal
@ParametersAreNonnullByDefault
public interface TemporaryWebAttachmentsMonitor
Temporary web attachments monitor is responsible for keeping temporary attachments uploaded by user. It also should
clean up those attachments if they expire (for example when user session expires).
Please do not use this class directly outside {com.atlassian.jira.web.util.TemporaryWebAttachmentManager} implementation.
- Since:
- v6.4
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TemporaryWebAttachment temporaryAttachment) Adds new temporary attachment.voidcleanByFormToken(String formToken) Removes all attachments from monitor and from attachment store, matched by form token.getByFormToken(String formToken) Gets all temporary attachments with given from token.io.atlassian.fugue.Option<TemporaryWebAttachment>Retrieves temporary attachment by id.io.atlassian.fugue.Option<TemporaryWebAttachment>removeById(String temporaryAttachmentId) Removes temporary attachment with given id from monitor.
-
Method Details
-
getById
Retrieves temporary attachment by id.- Parameters:
temporaryAttachmentId- temporary attachment id.- Returns:
- selected temporary attachment if exists
-
removeById
Removes temporary attachment with given id from monitor. Does not remove it from attachment store.- Parameters:
temporaryAttachmentId- Temporary Attachment Id which will be removed.- Returns:
- Removed temporary attachment if exists
-
add
Adds new temporary attachment.- Parameters:
temporaryAttachment- temporary attachment.
-
getByFormToken
Gets all temporary attachments with given from token.- Parameters:
formToken- form token- Returns:
- Collection of matched temporary attachments
-
cleanByFormToken
Removes all attachments from monitor and from attachment store, matched by form token.
-