@Internal @ParametersAreNonnullByDefault public interface

TemporaryWebAttachmentsMonitor

com.atlassian.jira.web.action.issue.TemporaryWebAttachmentsMonitor
Known Indirect Subclasses

@Internal

This interface is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

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.

Summary

Public Methods
void add(TemporaryWebAttachment temporaryAttachment)
Adds new temporary attachment.
void cleanByFormToken(String formToken)
Removes all attachments from monitor and from attachment store, matched by form token.
Collection<TemporaryWebAttachment> getByFormToken(String formToken)
Gets all temporary attachments with given from token.
Option<TemporaryWebAttachment> getById(String temporaryAttachmentId)
Retrieves temporary attachment by id.
Option<TemporaryWebAttachment> removeById(String temporaryAttachmentId)
Removes temporary attachment with given id from monitor.

Public Methods

public void add (TemporaryWebAttachment temporaryAttachment)

Adds new temporary attachment.

Parameters
temporaryAttachment temporary attachment.

public void cleanByFormToken (String formToken)

Removes all attachments from monitor and from attachment store, matched by form token.

public Collection<TemporaryWebAttachment> getByFormToken (String formToken)

Gets all temporary attachments with given from token.

Parameters
formToken form token
Returns
  • Collection of matched temporary attachments

public Option<TemporaryWebAttachment> getById (String temporaryAttachmentId)

Retrieves temporary attachment by id.

Parameters
temporaryAttachmentId temporary attachment id.
Returns
  • selected temporary attachment if exists

public 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