Interface IResolvedAttachmentList

All Superinterfaces:
IAttachmentItemResolutionErrorProviding
All Known Implementing Classes:
ResolvedAttachmentList

public interface IResolvedAttachmentList extends IAttachmentItemResolutionErrorProviding
Interface representing the resolved attachments as returned by IWorkflowFileHandler.resolveReferencedAttachments(WorkflowNode, IReferencedAttachmentList, IAttachmentSearchOptions) resolveReferencedAttachments}.
Since:
8.1.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • collectResult

      <R, E extends Throwable> R collectResult(IResolvedAttachmentListProcessor<R,E> handler) throws E
      Iterates over all resolved attachment items, processes them with the given handler, and returns the combined result of all attachment items. Standard use case is to convert errors to hard and soft workflow node errors and return a list of all resolved attachments.

      If you wish to use the standard error behavior for attachments, use standardAttachmentErrorsSingle or standardAttachmentErrorsMultiple. Otherwise, provide your own processor implementation, or extend the StandardErrorAttachmentListProcessor.

      Type Parameters:
      R - Type of the combined result of all attachment items.
      E - Type of the error that may be thrown when any errors are present.
      Parameters:
      handler - Handler for processing the errors and the results.
      Returns:
      The combined result of all attachment items.
      Throws:
      E - The first error thrown by the handler.
    • getAttachmentItems

      @Nonnull List<IResolvedAttachmentItem> getAttachmentItems()
      Retrieves the list of resolved attachment items. This list always contains one entry for each AttachmentItem that was passed to resolveReferencedAttachments, independent of whether any exceptions occurred while resolving that item. When IAttachmentItemResolutionErrorProviding.getErrors() is not null, this list is empty.
      Returns:
      A list with the resolved attachments.
    • getAttachmentList

      IReferencedAttachmentList getAttachmentList()
      Returns:
      The attachment list that was resolved to obtain this result.
    • getResolvedAttachmentsComplete

      @Nonnull default List<IResolvedAttachment> getResolvedAttachmentsComplete() throws Exception
      Returns:
      All resolved attachments that were found, when no errors occurred. When errors is not empty, this method throws.
      Throws:
      Exception - One of the exceptions present in IAttachmentItemResolutionErrorProviding.getErrors().
    • getResolvedAttachmentsPartial

      @Nonnull default List<IResolvedAttachment> getResolvedAttachmentsPartial()
      Returns:
      All attachments that were found, regardless of whether errors occurred or not. When errors is not empty, this list may be incomplete.