Interface AttachmentApi


  • public interface AttachmentApi
    Contains all api operations for handling attachments.
    • Method Detail

      • addAttachment

        Attachment addAttachment​(AddAttachmentRequest addAttachmentRequest)
        Create a new attachment and persist it.
        Parameters:
        addAttachmentRequest - Contains all information to be able to create a new attachment.
        Returns:
        The created Attachment
      • getAttachment

        Attachment getAttachment​(UUID attachmentId)
        Retrieve the attachment with the given id.
        Parameters:
        attachmentId - the attachment id
        Returns:
        the attachment
      • exists

        boolean exists​(UUID attachmentId)
        Returns true if an attachment with given ID exists.
        Parameters:
        attachmentId - the ID of the attachment
        Returns:
        true if an attachment with given ID exists, false otherwise
      • removeAttachment

        void removeAttachment​(UUID id)
        Removes the attachment identified by the given UUID.
        Parameters:
        id - the unique identifier of the attachment to delete
      • getAttachmentContent

        InputStream getAttachmentContent​(UUID id)
        Gets the content of the file contained by attachment identified by the given UUID.
        Parameters:
        id - the UUID of the attachment
        Returns:
        the content as InputStream