Class DefaultAttachmentStatusManager
- java.lang.Object
-
- com.atlassian.confluence.internal.index.attachment.DefaultAttachmentStatusManager
-
- All Implemented Interfaces:
AttachmentStatusManager
@ParametersAreNonnullByDefault public class DefaultAttachmentStatusManager extends Object implements AttachmentStatusManager
- Since:
- 6.2.2
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.internal.index.attachment.AttachmentStatusManager
ATTACHMENT_STATUS
-
-
Constructor Summary
Constructors Constructor Description DefaultAttachmentStatusManager(AttachmentDao attachmentDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<AttachmentStatus>
getAttachmentStatus(long id)
Get attachment status for given attachment version.void
updateAttachmentStatus(long id, AttachmentStatus status)
Update attachment status.
-
-
-
Constructor Detail
-
DefaultAttachmentStatusManager
public DefaultAttachmentStatusManager(AttachmentDao attachmentDao)
-
-
Method Detail
-
updateAttachmentStatus
public void updateAttachmentStatus(long id, AttachmentStatus status)
Description copied from interface:AttachmentStatusManager
Update attachment status. Update is performed by deletion of existent document in storage and inserting new one. Update is skipped if document with the same status already exists in storage.- Specified by:
updateAttachmentStatus
in interfaceAttachmentStatusManager
- Parameters:
id
- id of attachmentstatus
-AttachmentStatus
to update
-
getAttachmentStatus
public Optional<AttachmentStatus> getAttachmentStatus(long id)
Description copied from interface:AttachmentStatusManager
Get attachment status for given attachment version.- Specified by:
getAttachmentStatus
in interfaceAttachmentStatusManager
- Parameters:
id
- id of attachment- Returns:
AttachmentStatus
or empty result if there is no status for given version of attachment in the storage
-
-