Interface AttachmentApi
public interface AttachmentApi
Contains all api operations for handling attachments.
- 
Method SummaryModifier and TypeMethodDescriptionaddAttachment(AddAttachmentRequest addAttachmentRequest) Create a new attachment and persist it.booleanReturns true if an attachment with given ID exists.findAttachments(FindAttachmentsRequest findAttachmentsRequest) Finds the attachments according to the provided request.getAttachment(UUID attachmentId) Retrieve the attachment with the given id.Gets the content of the file contained by attachment identified by the given UUID.voidremoveAttachment(UUID id) Removes the attachment identified by the given UUID.
- 
Method Details- 
addAttachmentCreate a new attachment and persist it.- Parameters:
- addAttachmentRequest- Contains all information to be able to create a new attachment.
- Returns:
- The created Attachment
 
- 
getAttachmentRetrieve the attachment with the given id.- Parameters:
- attachmentId- the attachment id
- Returns:
- the attachment
 
- 
findAttachments@SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) PagedResponse<Attachment> findAttachments(FindAttachmentsRequest findAttachmentsRequest) Finds the attachments according to the provided request.- Parameters:
- findAttachmentsRequest- the request
- Returns:
- the attachments
 
- 
existsReturns true if an attachment with given ID exists.- Parameters:
- attachmentId- the ID of the attachment
- Returns:
- true if an attachment with given ID exists, falseotherwise
 
- 
removeAttachmentRemoves the attachment identified by the given UUID.- Parameters:
- id- the unique identifier of the attachment to delete
 
- 
getAttachmentContentGets 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
- Throws:
- ApiException- in case no transaction is defined.
 
 
-