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, eitherSingleFileorMultiFile.
- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileControl(String type, Value value)Constructs a new file control with the given type and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getContentTypes()The content types (mime types) accepted by this file control, e.g.StringgetDescription()Gets the localized description of this file control with additional information about the files.Set<String>getExtensions()Gets the file extensions accepted by this file control, without a leading period, e.g.StringgetLabel()Gets the localized label (display name) of this file control.StringgetType()Gets the type of this file control, either "singleFile" or "multiFile".ValuegetValue()Gets the value of this file control, either aSingleFileorMultiFileinstance.booleanisRequired()Whether this file input is required.voidsetContentTypes(Set<String> contentTypes)Sets the content types (mime types) accepted by this file control, e.g.voidsetDescription(String description)Sets the localized description of this file control with additional information about the files.voidsetExtensions(Set<String> extensions)Sets the file extensions accepted by this file control, swithout a leading period, e.g.voidsetLabel(String label)Sets the localized label (display name) of this file control.voidsetRequired(boolean required)Sets whether this file input is required.
-
-
-
Constructor Detail
-
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 aSingleFileorMultiFileinstance.
-
-
Method Detail
-
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 aSingleFileorMultiFileinstance.- 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.
-
-