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 of IFileValueDescriptor.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Details

  • Method Details

    • builder

      public IFileValueBuilder builder()
      Description copied from interface: IFileValueDescriptor
      Creates a builder for building a file value that conforms to this file value descriptor.
      Specified by:
      builder in interface IFileValueDescriptor
      Returns:
      A builder for building a file value that conforms to this file value descriptor.
    • getAdditionalFiles

      public IFileListDescriptor getAdditionalFiles()
      Description copied from interface: IFileValueDescriptor
      Gets the file descriptor for any additional files that may be provided by the workflow element, under keys not listed in IFileValueDescriptor.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:
      getAdditionalFiles in interface IFileValueDescriptor
      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: IAttributeConfigurable
      Gets 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:
      getAttributes in interface IAttributeConfigurable<IFileValueDescriptor>
      Returns:
      A map of additional attributes associated with this object.
    • getDescriptionI18n

      @Deprecated public String getDescriptionI18n()
      Deprecated.
      Description copied from interface: IFileValueDescriptor
      Gets the I18n key pointing to a description for the file.
      Specified by:
      getDescriptionI18n in interface IFileValueDescriptor
      Returns:
      I18n key pointing to a description for the file.
    • getFiles

      public Map<String, IFileListDescriptor> getFiles()
      Description copied from interface: IFileValueDescriptor
      Gets 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. Use IFileValueDescriptor.DEFAULT_FILE_KEY as 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:
      getFiles in interface IFileValueDescriptor
      Returns:
      The descriptor for the list of files provided by the workflow element.
    • intersect

      public IFileValueDescriptor intersect(IFileValueDescriptor other)
      Description copied from interface: IFileValueDescriptor
      Intersects 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 an empty descriptor.
      Specified by:
      intersect in interface IFileValueDescriptor
      Parameters:
      other - The other file value descriptor to intersect with.
      Returns:
      The intersection of this file value descriptor with the other file value descriptor.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withAddedAttribute

      public IFileValueDescriptor withAddedAttribute(String key, Object value)
      Description copied from interface: IAttributeConfigurable
      Gets a new instance with the attribute at the given key changed to the given value.
      Specified by:
      withAddedAttribute in interface IAttributeConfigurable<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: IAttributeConfigurable
      Gets 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:
      withAddedAttributes in interface IAttributeConfigurable<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: IAttributeConfigurable
      Gets a new instance with the attributes changed to the given map of attributes. Replaces all existing attributes.
      Specified by:
      withAttributes in interface IAttributeConfigurable<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