Class FileControl<Value>

java.lang.Object
de.xima.fc.workflow.designer.model.prompt_query.FileControl<Value>
Type Parameters:
Value - The type of the file control value, either SingleFile or MultiFile.
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiFileControl, SingleFileControl

public abstract class FileControl<Value> extends Object implements Serializable
View model for a file control in the prompt query action editor, either a single or multi file control. Each prompt query can define an arbitrary number of file inputs, each of which is represented by an instance of this class.
Since:
8.5.0
See Also:
  • Constructor Details

    • FileControl

      public FileControl(String type, Value value)
      Constructs a new file control with the given type and value.
      Parameters:
      type - The type of the file control, either "singleFile" or "multiFile".
      value - The value of the file control, either a SingleFile or MultiFile instance.
  • Method Details

    • getContentTypes

      public Set<String> getContentTypes()
      The content types (mime types) accepted by this file control, e.g. "image/png" or "application/pdf". When empty, no restrictions are applied.
      Returns:
      The content types accepted by this file control.
    • setContentTypes

      public void setContentTypes(Set<String> contentTypes)
      Sets the content types (mime types) accepted by this file control, e.g. "image/png" or "application/pdf". When empty, no restrictions are applied.
      Parameters:
      contentTypes - The content types to set.
    • getDescription

      public String getDescription()
      Gets the localized description of this file control with additional information about the files.
      Returns:
      The description of this file control.
    • setDescription

      public void setDescription(String description)
      Sets the localized description of this file control with additional information about the files.
      Parameters:
      description - The description to set.
    • getExtensions

      public Set<String> getExtensions()
      Gets the file extensions accepted by this file control, without a leading period, e.g. "png" or "pdf". When empty, no restrictions are applied.
      Returns:
      The file extensions accepted by this file control.
    • setExtensions

      public void setExtensions(Set<String> extensions)
      Sets the file extensions accepted by this file control, swithout a leading period, e.g. "png" or "pdf". When empty, no restrictions are applied.
      Parameters:
      extensions - The file extensions to set.
    • getLabel

      public String getLabel()
      Gets the localized label (display name) of this file control.
      Returns:
      The label of this file control.
    • setLabel

      public void setLabel(String label)
      Sets the localized label (display name) of this file control.
      Parameters:
      label - The label to set.
    • getType

      public String getType()
      Gets the type of this file control, either "singleFile" or "multiFile".
      Returns:
      The type of this file control.
    • getValue

      public Value getValue()
      Gets the value of this file control, either a SingleFile or MultiFile instance.
      Returns:
      The value of this file control.
    • isRequired

      public boolean isRequired()
      Whether this file input is required. When true, at least one file must be provided.
      Returns:
      True if the file input is required, false otherwise.
    • setRequired

      public void setRequired(boolean required)
      Sets whether this file input is required. When true, at least one file must be provided.
      Parameters:
      required - True if the file input is required, false otherwise.