Interface IResolvedAttachmentList
-
- All Superinterfaces:
IAttachmentItemResolutionErrorProviding
- All Known Implementing Classes:
ResolvedAttachmentList
public interface IResolvedAttachmentList extends IAttachmentItemResolutionErrorProviding
Interface representing the resolved attachments as returned byIWorkflowFileHandler.resolveReferencedAttachments(WorkflowNode, IReferencedAttachmentList, IAttachmentSearchOptions)
resolveReferencedAttachments}.- Since:
- 8.1.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <R,E extends Throwable>
RcollectResult(IResolvedAttachmentListProcessor<R,E> handler)
Iterates over all resolved attachment items, processes them with the given handler, and returns the combined result of all attachment items.List<IResolvedAttachmentItem>
getAttachmentItems()
Retrieves the list of resolved attachment items.IReferencedAttachmentList
getAttachmentList()
default List<IResolvedAttachment>
getResolvedAttachmentsComplete()
default List<IResolvedAttachment>
getResolvedAttachmentsPartial()
-
Methods inherited from interface de.xima.fc.interfaces.workflow.retval.IAttachmentItemResolutionErrorProviding
getErrors, getErrors, getErrorsAttachmentCountReducedTozeroByFilterOptions, getErrorsAttachmentFilterDoesNotMatch, getErrorsCannotProcessAttachmentItem, getErrorsCannotProcessAttachmentList, getErrorsDatabaseError, getErrorsFileSystemError, getErrorsNodeDoesNotExist, getErrorsNodeDoesNotProvideAttachments, getErrorsNodeNotExecuted, getErrorsUploadFieldDoesNotExist, getErrorsUploadFieldDoesNotProvideAttachments, isHasError
-
-
-
-
Method Detail
-
collectResult
<R,E extends Throwable> R collectResult(IResolvedAttachmentListProcessor<R,E> handler) throws E extends Throwable
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
orstandardAttachmentErrorsMultiple
. Otherwise, provide your own processor implementation, or extend theStandardErrorAttachmentListProcessor
.- Type Parameters:
R
- Type of the combined result of all attachment items.E
- Type of the error that may be thrown when anyerrors
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.E extends Throwable
-
getAttachmentItems
@Nonnull List<IResolvedAttachmentItem> getAttachmentItems()
Retrieves the list of resolved attachment items. This list always contains one entry for eachAttachmentItem
that was passed toresolveReferencedAttachments
, independent of whether any exceptions occurred while resolving that item. WhenIAttachmentItemResolutionErrorProviding.getErrors()
is notnull
, 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 inIAttachmentItemResolutionErrorProviding.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.
-
-