@ParametersAreNonnullByDefault public class DefaultTemporaryWebAttachmentsMonitor extends Object implements TemporaryWebAttachmentsMonitor, Startable
Constructor and Description |
---|
DefaultTemporaryWebAttachmentsMonitor(StreamAttachmentStore attachmentStore,
TemporaryAttachmentMonitorStore temporaryAttachmentMonitorStore,
com.atlassian.scheduler.SchedulerService schedulerService) |
Modifier and Type | Method and Description |
---|---|
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.
|
io.atlassian.fugue.Option<TemporaryWebAttachment> |
getById(String temporaryAttachmentId)
Retrieves temporary attachment by id.
|
io.atlassian.fugue.Option<TemporaryWebAttachment> |
removeById(String temporaryAttachmentId)
Removes temporary attachment with given id from monitor.
|
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
public DefaultTemporaryWebAttachmentsMonitor(StreamAttachmentStore attachmentStore, TemporaryAttachmentMonitorStore temporaryAttachmentMonitorStore, com.atlassian.scheduler.SchedulerService schedulerService)
public void start() throws Exception
Startable
public io.atlassian.fugue.Option<TemporaryWebAttachment> getById(String temporaryAttachmentId)
TemporaryWebAttachmentsMonitor
getById
in interface TemporaryWebAttachmentsMonitor
temporaryAttachmentId
- temporary attachment id.public io.atlassian.fugue.Option<TemporaryWebAttachment> removeById(String temporaryAttachmentId)
TemporaryWebAttachmentsMonitor
removeById
in interface TemporaryWebAttachmentsMonitor
temporaryAttachmentId
- Temporary Attachment Id which will be removed.public void add(TemporaryWebAttachment temporaryAttachment)
TemporaryWebAttachmentsMonitor
add
in interface TemporaryWebAttachmentsMonitor
temporaryAttachment
- temporary attachment.public Collection<TemporaryWebAttachment> getByFormToken(String formToken)
TemporaryWebAttachmentsMonitor
getByFormToken
in interface TemporaryWebAttachmentsMonitor
formToken
- form tokenpublic void cleanByFormToken(String formToken)
TemporaryWebAttachmentsMonitor
cleanByFormToken
in interface TemporaryWebAttachmentsMonitor
Copyright © 2002-2022 Atlassian. All Rights Reserved.