Class ResolvedResourceItem
- java.lang.Object
-
- de.xima.fc.workflow.processor.model.ResolvedResourceItem
-
- All Implemented Interfaces:
IResolvedResourceItem
,IResourceItemResolutionErrorProviding
public class ResolvedResourceItem extends Object implements IResolvedResourceItem
Default POJO implementation ofIResolvedResourceItem
.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResolvedResourceItem.Builder
Builder to buildResolvedResourceItem
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedResourceItem.Builder
builder(ResourceItem resourceItem)
Creates a builder to buildResolvedResourceItem
.Map<EResourceItemResolutionError,List<AFileListResolutionError>>
getErrors()
List<IResolvedFile>
getIndividualFiles()
Retrieves all files that were found for the resource item.ResourceItem
getResourceItem()
static IResolvedResourceItem
ofError(AFileListResolutionError.AResourceItemResolutionError error)
static IResolvedResourceItem
ofSuccess(ResourceItem item, ResolvedFile file)
-
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.IResourceItemResolutionErrorProviding
getErrors, getErrorsAttachmentFilterDoesNotMatch, getErrorsCannotProcessFileList, getErrorsCannotProcessResourceItem, getErrorsClientFileDoesNotExist, getErrorsDatabaseError, getErrorsExternalUrlCannotBeRead, getErrorsExternalUrlIsSyntacticallyInvalid, getErrorsFileCountReducedTozeroByFilterOptions, getErrorsFileSystemError, getErrorsFormFileDoesNotExist, getErrorsNodeDoesNotExist, getErrorsNodeDoesNotProvideFiles, getErrorsNodeNotExecuted, getErrorsTriggerDoesNotExist, getErrorsTriggerDoesNotProvideFiles, getErrorsTriggerNotFired, getErrorsUploadFieldDoesNotExist, getErrorsUploadFieldDoesNotProvideFiles, isHasError
-
-
-
-
Method Detail
-
getErrors
public Map<EResourceItemResolutionError,List<AFileListResolutionError>> getErrors()
- Specified by:
getErrors
in interfaceIResourceItemResolutionErrorProviding
- Returns:
- All errors that occurred during the resource item's resolution.
-
getIndividualFiles
public List<IResolvedFile> getIndividualFiles()
Description copied from interface:IResolvedResourceItem
Retrieves all files that were found for the resource item. This is done on a best-effort basis. When theerrors
are not empty, this list may contain only some of the files referenced by the resource item.- Specified by:
getIndividualFiles
in interfaceIResolvedResourceItem
- Returns:
- A list of all files that were found for the resource item.
-
getResourceItem
public ResourceItem getResourceItem()
- Specified by:
getResourceItem
in interfaceIResolvedResourceItem
- Returns:
- The resource item that was resolved.
-
builder
public static ResolvedResourceItem.Builder builder(ResourceItem resourceItem)
Creates a builder to buildResolvedResourceItem
.- Parameters:
resourceItem
- The resource item that is being resolved.- Returns:
- A new builder.
-
ofError
public static IResolvedResourceItem ofError(AFileListResolutionError.AResourceItemResolutionError error)
- Parameters:
error
- Error that occurred.- Returns:
- A new resolved resource item with a single error and no files.
-
ofSuccess
public static IResolvedResourceItem ofSuccess(ResourceItem item, ResolvedFile file)
- Parameters:
item
- Item that was resolved.file
- File that was obtained.- Returns:
- A new resolved resource item with a single file and no errors.
-
-