Class TemporaryAttachmentsMonitor
java.lang.Object
com.atlassian.jira.web.action.issue.TemporaryAttachmentsMonitor
- All Implemented Interfaces:
Serializable
,EventListener
,javax.servlet.http.HttpSessionBindingListener
@Deprecated
@PublicApi
public class TemporaryAttachmentsMonitor
extends Object
implements javax.servlet.http.HttpSessionBindingListener, Serializable
Deprecated.
This class maintains a list of temporary attachments uploaded by a user. When the user's session expires or the user
logs out, it is responsible of deleting any temporary files that were not converted to proper attachments.
- Since:
- v4.2
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TemporaryAttachment temporaryAttachment) Deprecated.Adds temporary attachments to the interally maintained list of temporary attachementsvoid
clearEntriesForFormToken
(String formToken) Deprecated.Removes all temporary attachments for the given formToken.void
clearEntriesForIssue
(Long issueId) Deprecated.since 6.3 useclearEntriesForFormToken(String)
instead.getByFormToken
(String formToken) Deprecated.Returns all temporary attachments, which were bound to given form token.Deprecated.Returns matching temporary attachment by attachment id.getByIssueId
(Long issueId) Deprecated.since 6.3 usegetByFormToken(String)
instead.void
valueBound
(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent) Deprecated.void
valueUnbound
(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent) Deprecated.When this object is unbount from the HttpSession, it's responsible for cleanup.
-
Constructor Details
-
TemporaryAttachmentsMonitor
public TemporaryAttachmentsMonitor()Deprecated.
-
-
Method Details
-
add
Deprecated.Adds temporary attachments to the interally maintained list of temporary attachements- Parameters:
temporaryAttachment
- the attachment to add
-
getById
Deprecated.Returns matching temporary attachment by attachment id.- Parameters:
id
- the id of the temporary attachment- Returns:
- The temporary attachment or null if no matching attachment was found
-
getByIssueId
Deprecated.since 6.3 usegetByFormToken(String)
instead.Returns all currently matching temporary attachments for a particular issue. If a null issue id is provided, this should be interpreted as a newly created issue that doesn't have an id yet.- Parameters:
issueId
- The id of the issue to get attachmetns for. May be null- Returns:
- a collection of temporary attachments for this issue sorted by creation date
-
getByFormToken
Deprecated.Returns all temporary attachments, which were bound to given form token. Form token may not be null.- Parameters:
formToken
-- Returns:
- a collection of temporary attachments for this form token sorted by creation date
-
clearEntriesForIssue
Deprecated.since 6.3 useclearEntriesForFormToken(String)
instead.Removes all temporary attachments for the given issue. The issueId may be null to indicate a newly created issue, that doesn't have an id yet.- Parameters:
issueId
- The id of the issue to remove entries for. May be null.
-
clearEntriesForFormToken
Deprecated.Removes all temporary attachments for the given formToken. Form token may not be null;- Parameters:
formToken
- The formToken of the form to remove entries for. May not be null.
-
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent) Deprecated.- Specified by:
valueBound
in interfacejavax.servlet.http.HttpSessionBindingListener
-
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent) Deprecated.When this object is unbount from the HttpSession, it's responsible for cleanup. Any temporary attachments not converted to real attachments by now should be deleted to save disk space!- Specified by:
valueUnbound
in interfacejavax.servlet.http.HttpSessionBindingListener
- Parameters:
httpSessionBindingEvent
-
-
TemporaryWebAttachmentManager
instead. Since v6.4