Class PromptTestFileInput

java.lang.Object
de.xima.fc.prompt.mgmt.gui.model.PromptTestFileInput
All Implemented Interfaces:
Serializable

public class PromptTestFileInput extends Object implements Serializable
View model for a file control in the prompt query test editor. 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

    • PromptTestFileInput

      public PromptTestFileInput(String fileKey, IFileListDescriptor fileListDescriptor)
      Constructs a new file control from the given file list descriptor.
      Parameters:
      fileKey - The key of the file input, as defined in the prompt query.
      fileListDescriptor - The file list descriptor to construct the file control from.
  • 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.
    • 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.
    • getFileKey

      public String getFileKey()
      Gets the key of this file control, as defined by the prompt query input descriptor.
      Returns:
      The key of this file control.
    • 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.
    • getMaxFileCount

      public int getMaxFileCount()
      Gets the maximum number of files that can be provided.
      Returns:
      The maximum number of files that can be provided.
    • getMinFileCount

      public int getMinFileCount()
      Gets the minimum number of files that must be provided.
      Returns:
      The minimum number of files that must be provided.