Interface AttachmentStatusManager
-
- All Known Implementing Classes:
DefaultAttachmentStatusManager
public interface AttachmentStatusManagerAttachment status manager. Provides basic operations to manage attachment statuses. As attachment status is kept in content properties, this manager doesn't provide any delete* methods, because proper deletion of content properties (including attachment status) should be cascaded on attachment entity deletion.- Since:
- 6.2.2
- See Also:
AttachmentStatus,Attachment
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTACHMENT_STATUS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<AttachmentStatus>getAttachmentStatus(long id)Get attachment status for given attachment version.voidupdateAttachmentStatus(long id, AttachmentStatus status)Update attachment status.
-
-
-
Field Detail
-
ATTACHMENT_STATUS
static final String ATTACHMENT_STATUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateAttachmentStatus
@Transactional(propagation=REQUIRES_NEW) void updateAttachmentStatus(long id, AttachmentStatus status)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.- Parameters:
id- id of attachmentstatus-AttachmentStatusto update
-
getAttachmentStatus
@Transactional(readOnly=true, propagation=REQUIRES_NEW) Optional<AttachmentStatus> getAttachmentStatus(long id)Get attachment status for given attachment version.- Parameters:
id- id of attachment- Returns:
AttachmentStatusor empty result if there is no status for given version of attachment in the storage
-
-