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
    • 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 attachment
        status - 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