Class ResolvedAttachmentList
- java.lang.Object
 - 
- de.xima.fc.workflow.processor.model.ResolvedAttachmentList
 
 
- 
- All Implemented Interfaces:
 IAttachmentItemResolutionErrorProviding,IResolvedAttachmentList
public final class ResolvedAttachmentList extends Object implements IResolvedAttachmentList
Default POJO implementation ofIResolvedAttachmentList.- Since:
 - 8.1.0
 - Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete 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.IReferencedAttachmentListgetAttachmentList()Map<EAttachmentItemResolutionError,List<AAttachmentListResolutionError>>getErrors()static IResolvedAttachmentListofError(AAttachmentListResolutionError.CannotProcessAttachmentList error)Creates a new POJO with the given data and no containing directory and attachments.static IResolvedAttachmentListofSuccess(IReferencedAttachmentList attachmentList, List<IResolvedAttachmentItem> resourceItems)Creates a new POJO with the given data and thegetErrors()set tonull.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface de.xima.fc.interfaces.workflow.retval.IAttachmentItemResolutionErrorProviding
getErrors, getErrorsAttachmentCountReducedTozeroByFilterOptions, getErrorsAttachmentFilterDoesNotMatch, getErrorsCannotProcessAttachmentItem, getErrorsCannotProcessAttachmentList, getErrorsDatabaseError, getErrorsFileSystemError, getErrorsNodeDoesNotExist, getErrorsNodeDoesNotProvideAttachments, getErrorsNodeNotExecuted, getErrorsUploadFieldDoesNotExist, getErrorsUploadFieldDoesNotProvideAttachments, isHasError 
- 
Methods inherited from interface de.xima.fc.interfaces.workflow.retval.IResolvedAttachmentList
getResolvedAttachmentsComplete, getResolvedAttachmentsPartial 
 - 
 
 - 
 
- 
- 
Method Detail
- 
collectResult
public <R,E extends Throwable> R collectResult(IResolvedAttachmentListProcessor<R,E> handler) throws E extends Throwable
Description copied from interface:IResolvedAttachmentListIterates 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
standardAttachmentErrorsSingleorstandardAttachmentErrorsMultiple. Otherwise, provide your own processor implementation, or extend theStandardErrorAttachmentListProcessor.- Specified by:
 collectResultin interfaceIResolvedAttachmentList- Type Parameters:
 R- Type of the combined result of all attachment items.E- Type of the error that may be thrown when anyerrorsare 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
 
- 
getErrors
public Map<EAttachmentItemResolutionError,List<AAttachmentListResolutionError>> getErrors()
- Specified by:
 getErrorsin interfaceIAttachmentItemResolutionErrorProviding- Returns:
 - All errors that occurred during the attachment item's resolution.
 
 
- 
getAttachmentList
public IReferencedAttachmentList getAttachmentList()
- Specified by:
 getAttachmentListin interfaceIResolvedAttachmentList- Returns:
 - The attachment list that was resolved to obtain this result.
 
 
- 
getAttachmentItems
public List<IResolvedAttachmentItem> getAttachmentItems()
Description copied from interface:IResolvedAttachmentListRetrieves the list of resolved attachment items. This list always contains one entry for eachAttachmentItemthat was passed toresolveReferencedAttachments, independent of whether any exceptions occurred while resolving that item. WhenIAttachmentItemResolutionErrorProviding.getErrors()is notnull, this list is empty.- Specified by:
 getAttachmentItemsin interfaceIResolvedAttachmentList- Returns:
 - A list with the resolved attachments.
 
 
- 
ofError
public static IResolvedAttachmentList ofError(AAttachmentListResolutionError.CannotProcessAttachmentList error)
Creates a new POJO with the given data and no containing directory and attachments.- Parameters:
 error- Value as returned bygetErrors().- Returns:
 - New resolved attachment list for the given error.
 
 
- 
ofSuccess
public static IResolvedAttachmentList ofSuccess(IReferencedAttachmentList attachmentList, List<IResolvedAttachmentItem> resourceItems)
Creates a new POJO with the given data and thegetErrors()set tonull.- Parameters:
 attachmentList- Original attachment list that was processed.resourceItems- Value as returned bygetAttachmentItems().- Returns:
 - New resolved attachment list for the given resolved items.
 
 
 - 
 
 -