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 Details

    • getById

      io.atlassian.fugue.Option<TemporaryWebAttachment> getById(String temporaryAttachmentId)
      Retrieves temporary attachment by id.
      Parameters:
      temporaryAttachmentId - temporary attachment id.
      Returns:
      selected temporary attachment if exists
    • removeById

      io.atlassian.fugue.Option<TemporaryWebAttachment> removeById(String temporaryAttachmentId)
      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

      void add(TemporaryWebAttachment temporaryAttachment)
      Adds new temporary attachment.
      Parameters:
      temporaryAttachment - temporary attachment.
    • getByFormToken

      Collection<TemporaryWebAttachment> getByFormToken(String formToken)
      Gets all temporary attachments with given from token.
      Parameters:
      formToken - form token
      Returns:
      Collection of matched temporary attachments
    • cleanByFormToken

      void cleanByFormToken(String formToken)
      Removes all attachments from monitor and from attachment store, matched by form token.