Interface AttachmentStatusManager
-
- All Known Implementing Classes:
DefaultAttachmentStatusManager
public interface AttachmentStatusManager
Attachment 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 String
ATTACHMENT_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.void
updateAttachmentStatus(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
-AttachmentStatus
to 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:
AttachmentStatus
or empty result if there is no status for given version of attachment in the storage
-
-