Interface IFileListDescriptor
-
- All Superinterfaces:
IAttributeConfigurable<IFileListDescriptor>,Serializable
- All Known Implementing Classes:
FileListDescriptor
public interface IFileListDescriptor extends IAttributeConfigurable<IFileListDescriptor>, Serializable
A descriptor for a list of files provided by a workflow trigger or node when the trigger fires or the node gets executed.- Since:
- 8.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleanallowsAnyFiles()Whether the constraints of list descriptor allow any files.IFileListBuilderbuilder()Creates a new builder for configuring a file list conforming to this descriptor.Map<String,Object>getAttributes()Gets a map of additional custom attributes associated with this file list.Set<String>getContentTypes()The content types of the files that might be contained in the list of files.default StringgetDescription()Deprecated.Set<String>getExtensions()The file extensions of the files that can be contained in the list of files.intgetMaxFileCount()The maximum number of files that will be contained in the list of files.intgetMinFileCount()The minimum number of files that are contained in the list of files. 0 when the list might be empty, 1 if the list will contain at least one file.IFileListDescriptorintersect(IFileListDescriptor other)Intersects this file list descriptor with another file list descriptor.default booleanisDescriptionHtml()Deprecated.default booleanisDescriptionI18nKey()Deprecated.-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.IAttributeConfigurable
getAttribute, getAttribute, getBooleanAttribute, getBooleanAttribute, getFloatAttribute, getFloatAttribute, getIntegerAttribute, getIntegerAttribute, getStringAttribute, getStringAttribute, withAddedAttribute, withAddedAttributes, withAttributes
-
-
-
-
Method Detail
-
allowsAnyFiles
default boolean allowsAnyFiles()
Whether the constraints of list descriptor allow any files. For example, no files are allowed when the content types are empty; or when the minimum file count is less than the maximum file count.- Returns:
- Whether the constraints of list descriptor allow any files.
-
builder
IFileListBuilder builder()
Creates a new builder for configuring a file list conforming to this descriptor.- Returns:
- A new builder for configuring a file list conforming to this descriptor.
-
getAttributes
Map<String,Object> getAttributes()
Gets a map of additional custom attributes associated with this file list. The exact meaning of these attributes is up to the user of the file value descriptor API.See
StandardValueDescriptorAttributesfor some standard attribute keys.- Specified by:
getAttributesin interfaceIAttributeConfigurable<IFileListDescriptor>- Returns:
- A map of additional attributes associated with the file list.
- Since:
- 8.5.0
- See Also:
StandardValueDescriptorAttributes
-
getContentTypes
Set<String> getContentTypes()
The content types of the files that might be contained in the list of files. Each content type is a MIME type. Use "*/*" when the content type is unknown or any type of file might be contained in the list. Use an asterisk as a wildcard to allow a range of content types, e.g. "image/*". An empty set allows no files.null is treated as if the empty set had been returned.
- Returns:
- The content types of the files that might be contained in the list of files.
-
getDescription
@Deprecated default String getDescription()
Deprecated.Gets the description for the file. Can be either a localized message or an I18N key.- Returns:
- I18n key pointing to a description for the file.
-
getExtensions
Set<String> getExtensions()
The file extensions of the files that can be contained in the list of files. Each extension is a string without a leading dot, e.g. "pdf" or "png". Use the empty string "" to allow files without an extension. Use a set with a single entry "*" when the extension is unknown or any extension is allowed. An empty set allows no files.Implementations should normalize extensions to lower case, so that this method always returns lower case extensions.
null is treated as if the empty set had been returned.
- Returns:
- The file extensions of the files that can be contained in the list of files.
-
getMaxFileCount
int getMaxFileCount()
The maximum number of files that will be contained in the list of files.MAX_VALUEwhen there is no limit.- Returns:
- The maximum number of files that will be contained in the list of files.
-
getMinFileCount
int getMinFileCount()
The minimum number of files that are contained in the list of files. 0 when the list might be empty, 1 if the list will contain at least one file.- Returns:
- The minimum number of files that are contained in the list of files.
-
intersect
IFileListDescriptor intersect(IFileListDescriptor other)
Intersects this file list descriptor with another file list descriptor. The intersection of two file list descriptors is a new file list descriptor that only allows files that are allowed by both file list descriptors. When the two file list descriptors are incompatible, returns anemptydescriptor.This operation is, for the most part, symmetric / commutative. The only exception is the
attribute mapof thefiles. When both input descriptors have an attribute with the same key but different values, the value from the right hand side is used.- Parameters:
other- The other file list descriptor to intersect with.- Returns:
- The intersection of this file list descriptor with the other file list descriptor.
-
isDescriptionHtml
@Deprecated default boolean isDescriptionHtml()
Deprecated.Whether thegetDescription()is an HTML string (make sure it's valid and properly escaped!). When false, the description is treated as plain text.- Returns:
- Whether the description is an HTML string.
-
isDescriptionI18nKey
@Deprecated default boolean isDescriptionI18nKey()
Deprecated.Whether thegetDescription()is an I18N key that needs to be looked up in a resource bundle. When false, the description value is used as-is.- Returns:
- Whether the description is an I18N key (true) or a plain text description (false).
-
-