Package de.xima.fc.workflow
Class FileValueDescriptor
- java.lang.Object
-
- de.xima.fc.workflow.FileValueDescriptor
-
- All Implemented Interfaces:
IFileValueDescriptor,IAttributeConfigurable<IFileValueDescriptor>,Serializable
public final class FileValueDescriptor extends Object implements IFileValueDescriptor
POJO implementation ofIFileValueDescriptor.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileValueDescriptor.BuilderBuilder for a file value descriptor.
-
Field Summary
-
Fields inherited from interface de.xima.fc.interfaces.workflow.execution.IFileValueDescriptor
DEFAULT_FILE_KEY
-
-
Constructor Summary
Constructors Constructor Description FileValueDescriptor(String descriptionI18n)Deprecated.UsefileValueDescriptorBuilder()instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static IFileValueDescriptorany()Gets a file value descriptor that allows any list of files at any key.static IFileValueDescriptoranyFileValueDescriptor()Gets a file value descriptor that allows any list of files at any key.IFileValueBuilderbuilder()Creates a builder for building a file value that conforms to this file value descriptor.static IFileValueDescriptorempty()Creates an empty file value descriptor for when no files are provided.static IFileValueDescriptoremptyFileValueDescriptorIfNull(IFileValueDescriptor fileValueDescriptor)Returns the given file value descriptor if it is not null, or an empty file value descriptor otherwise.static FileValueDescriptor.BuilderfileValueDescriptorBuilder()Creates a new builder for a file value descriptor.IFileListDescriptorgetAdditionalFiles()Gets the file descriptor for any additional files that may be provided by the workflow element, under keys not listed inIFileValueDescriptor.getFiles().Map<String,Object>getAttributes()Gets a map of additional custom attributes associated with this object.StringgetDescriptionI18n()Deprecated.Map<String,IFileListDescriptor>getFiles()Gets the descriptor for the list of files provided by the workflow element.IFileValueDescriptorintersect(IFileValueDescriptor other)Intersects this file value descriptor with another file value descriptor.StringtoString()IFileValueDescriptorwithAddedAttribute(String key, Object value)Gets a new instance with the attribute at the given key changed to the given value.IFileValueDescriptorwithAddedAttributes(Map<String,Object> newAttributes)Gets a new instance with the attributes changed to the given map of attributes.IFileValueDescriptorwithAttributes(Map<String,Object> attributes)Gets a new instance with the attributes changed to the given map of attributes.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.IAttributeConfigurable
getAttribute, getAttribute, getBooleanAttribute, getBooleanAttribute, getFloatAttribute, getFloatAttribute, getIntegerAttribute, getIntegerAttribute, getStringAttribute, getStringAttribute
-
Methods inherited from interface de.xima.fc.interfaces.workflow.execution.IFileValueDescriptor
allowsAnyFiles
-
-
-
-
Constructor Detail
-
FileValueDescriptor
@Deprecated public FileValueDescriptor(String descriptionI18n)
Deprecated.UsefileValueDescriptorBuilder()instead. UseIFileValueDescriptor.DEFAULT_FILE_KEYas the key for the default file list.Creates a new POJO implementation ofIFileValueDescriptorwith the given data.- Parameters:
descriptionI18n- The value that is returned byIFileValueDescriptor.getDescriptionI18n().
-
-
Method Detail
-
builder
public IFileValueBuilder builder()
Description copied from interface:IFileValueDescriptorCreates a builder for building a file value that conforms to this file value descriptor.- Specified by:
builderin interfaceIFileValueDescriptor- Returns:
- A builder for building a file value that conforms to this file value descriptor.
-
getAdditionalFiles
public IFileListDescriptor getAdditionalFiles()
Description copied from interface:IFileValueDescriptorGets the file descriptor for any additional files that may be provided by the workflow element, under keys not listed inIFileValueDescriptor.getFiles(). This may be used when the keys of the files are not known in advance or any keys are allowed. If this method returns null, no additional files are allowed.- Specified by:
getAdditionalFilesin interfaceIFileValueDescriptor- Returns:
- The file descriptor for any additional files that may be provided by the workflow element, or null if no additional files are allowed.
-
getAttributes
public Map<String,Object> getAttributes()
Description copied from interface:IAttributeConfigurableGets a map of additional custom attributes associated with this object. The exact meaning of these attributes is up to the user of the API.- Specified by:
getAttributesin interfaceIAttributeConfigurable<IFileValueDescriptor>- Returns:
- A map of additional attributes associated with this object.
-
getDescriptionI18n
@Deprecated public String getDescriptionI18n()
Deprecated.Description copied from interface:IFileValueDescriptorGets the I18n key pointing to a description for the file.- Specified by:
getDescriptionI18nin interfaceIFileValueDescriptor- Returns:
- I18n key pointing to a description for the file.
-
getFiles
public Map<String,IFileListDescriptor> getFiles()
Description copied from interface:IFileValueDescriptorGets the descriptor for the list of files provided by the workflow element. Different types of files may be provided. The map key is an internal technical identifier for the file type. UseIFileValueDescriptor.DEFAULT_FILE_KEYas the key for the default list of files. For example, a workflow action that creates a certificate might provide different a file for the certificate signing request, a file for the private key, and a file for the public key.- Specified by:
getFilesin interfaceIFileValueDescriptor- Returns:
- The descriptor for the list of files provided by the workflow element.
-
intersect
public IFileValueDescriptor intersect(IFileValueDescriptor other)
Description copied from interface:IFileValueDescriptorIntersects this file value descriptor with another file value descriptor. The intersection of two file value descriptors is a new value list descriptor that only allows files that are allowed by both file list descriptors. When the two file value descriptors are incompatible, returns anemptydescriptor.- Specified by:
intersectin interfaceIFileValueDescriptor- Parameters:
other- The other file value descriptor to intersect with.- Returns:
- The intersection of this file value descriptor with the other file value descriptor.
-
withAddedAttribute
public IFileValueDescriptor withAddedAttribute(String key, Object value)
Description copied from interface:IAttributeConfigurableGets a new instance with the attribute at the given key changed to the given value.- Specified by:
withAddedAttributein interfaceIAttributeConfigurable<IFileValueDescriptor>- Parameters:
key- The attribute key.value- The attribute value.- Returns:
- A new instance with the new attribute.
-
withAddedAttributes
public IFileValueDescriptor withAddedAttributes(Map<String,Object> newAttributes)
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Preserves other existing attributes and only adds or replaces the given ones.- Specified by:
withAddedAttributesin interfaceIAttributeConfigurable<IFileValueDescriptor>- Parameters:
newAttributes- The new attributes to add (or replace).- Returns:
- A new instance with the current attributes plus the given attributes.
-
withAttributes
public IFileValueDescriptor withAttributes(Map<String,Object> attributes)
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Replaces all existing attributes.- Specified by:
withAttributesin interfaceIAttributeConfigurable<IFileValueDescriptor>- Parameters:
attributes- The new attributes.- Returns:
- A new instance with the given attributes.
-
any
public static IFileValueDescriptor any()
Gets a file value descriptor that allows any list of files at any key.- Returns:
- A file value descriptor that allows everything.
-
anyFileValueDescriptor
public static IFileValueDescriptor anyFileValueDescriptor()
Gets a file value descriptor that allows any list of files at any key.- Returns:
- A file value descriptor that allows everything.
-
empty
public static IFileValueDescriptor empty()
Creates an empty file value descriptor for when no files are provided.- Returns:
- An empty file value descriptor.
-
emptyFileValueDescriptorIfNull
public static IFileValueDescriptor emptyFileValueDescriptorIfNull(IFileValueDescriptor fileValueDescriptor)
Returns the given file value descriptor if it is not null, or an empty file value descriptor otherwise.- Parameters:
fileValueDescriptor- The file value descriptor to return if it is not null.- Returns:
- The given file value descriptor if it is not null, or an empty file value descriptor otherwise.
-
fileValueDescriptorBuilder
public static FileValueDescriptor.Builder fileValueDescriptorBuilder()
Creates a new builder for a file value descriptor.- Returns:
- A new builder for a file value descriptor.
- Since:
- 8.2.0
-
-