Interface IResolvedFileList
-
- All Superinterfaces:
IResourceItemResolutionErrorProviding
- All Known Implementing Classes:
ResolvedFileList
public interface IResolvedFileList extends IResourceItemResolutionErrorProviding
Interface representing the resolved files as returned byresolveReferencedFiles
.- Since:
- 8.0.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(IResolvedFileListProcessor<R,E> handler)
Iterates over all resolved resource items, processes them with the given handler, and returns the combined result of all resource items.File
getContainingDirectory()
Retrieves the directory that contains all the resolved files; and only the resolved files.IReferencedFileList
getFileList()
default List<IResolvedFile>
getResolvedFilesComplete()
default List<IResolvedFile>
getResolvedFilesPartial()
List<IResolvedResourceItem>
getResourceItems()
Retrieves the list of resolved resource items.-
Methods inherited from interface de.xima.fc.interfaces.workflow.retval.IResourceItemResolutionErrorProviding
getErrors, getErrors, getErrorsAttachmentFilterDoesNotMatch, getErrorsCannotProcessFileList, getErrorsCannotProcessResourceItem, getErrorsClientFileDoesNotExist, getErrorsDatabaseError, getErrorsExternalUrlCannotBeRead, getErrorsExternalUrlIsSyntacticallyInvalid, getErrorsFileCountReducedTozeroByFilterOptions, getErrorsFileSystemError, getErrorsFormFileDoesNotExist, getErrorsNodeDoesNotExist, getErrorsNodeDoesNotProvideFiles, getErrorsNodeNotExecuted, getErrorsTriggerDoesNotExist, getErrorsTriggerDoesNotProvideFiles, getErrorsTriggerNotFired, getErrorsUploadFieldDoesNotExist, getErrorsUploadFieldDoesNotProvideFiles, isHasError
-
-
-
-
Method Detail
-
collectResult
<R,E extends Throwable> R collectResult(IResolvedFileListProcessor<R,E> handler) throws E extends Throwable
Iterates over all resolved resource items, processes them with the given handler, and returns the combined result of all resource items. Standard use case is to convert errors to hard and soft workflow node errors and return a list of all resolved files.If you wish to use the standard error behavior for files, use
standardFileErrorsSingle
orstandardFileErrorsMultiple
. Otherwise, provide your own processor implementation, or extends theStandardErrorFileListProcessor
.- Type Parameters:
R
- Type of the combined result of all resource 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 resource items.
- Throws:
E
- The first error thrown by the handler.E extends Throwable
-
getContainingDirectory
@Nullable File getContainingDirectory()
Retrieves the directory that contains all the resolved files; and only the resolved files. The directory is empty when no files were found.- Returns:
- A temporary directory with all the files from the given descriptor.
null
whenIResourceItemResolutionErrorProviding.getErrors()
is notnull
.
-
getFileList
IReferencedFileList getFileList()
- Returns:
- The file list that was resolved to obtain this result.
-
getResolvedFilesComplete
@Nonnull default List<IResolvedFile> getResolvedFilesComplete() throws Exception
- Returns:
- All resolved files that were found, when no errors occurred. When
errors
is not empty, this method throws. - Throws:
Exception
- One of the exceptions present inIResourceItemResolutionErrorProviding.getErrors()
.
-
getResolvedFilesPartial
@Nonnull default List<IResolvedFile> getResolvedFilesPartial()
- Returns:
- All files that were found, regardless of whether errors occurred or not. When
errors
is not empty, this list may be incomplete.
-
getResourceItems
@Nonnull List<IResolvedResourceItem> getResourceItems()
Retrieves the list of resolved resource items. This list always contains one entry for eachResourceItem
that was passed toresolveReferencedFiles
, whether any exceptions occurred while resolving that item. WhenIResourceItemResolutionErrorProviding.getErrors()
is notnull
, this list is empty.- Returns:
- A list with the resolved files.
-
-