Class PromptFiles

java.lang.Object
de.xima.fc.prompt.service.support.PromptFiles
All Implemented Interfaces:
Serializable

public final class PromptFiles extends Object implements Serializable
A configuration for a set of files, used by the configuration of a prompt connection or query. The files can come from either dynamic file input parameters (the user must provide the file(s) when executing the query) and/or from a statically configured files (files must be uploaded in the query configuration UI).

This model is intended both for use cases that allow only a single file, and for use cases that allow multiple files. In case only a single file is allowed, source decides whether the dynamic or static file is used. The UI and/or the validation logic must ensure that only a single file is configured.

Since:
8.5.0
See Also:
  • Constructor Details

    • PromptFiles

      public PromptFiles()
  • Method Details

    • getDynamicFiles

      public List<PromptFileSetParameter> getDynamicFiles()
      Applicable only when the source is DYNAMIC or ANY.

      Gets the configuration for the single dynamic file input parameter that the user must provide when executing the query.

      Returns:
      The configuration for the single dynamic file input parameter.
    • setDynamicFiles

      public void setDynamicFiles(List<PromptFileSetParameter> dynamicFiles)
      Applicable only when the source is DYNAMIC or ANY.

      Sets the configuration for the single dynamic file input parameter that the user must provide when executing the query.

      Parameters:
      dynamicFiles - The configuration for the single dynamic file input parameter.
    • getSource

      public PromptFileSource getSource()
      Gets the source of the file, either DYNAMIC (the user must provide the file when executing the query) or STATIC (the file must be uploaded in the query configuration UI). Can be null to indicate that there are no files.
      Returns:
      The source of the file.
    • setSource

      public void setSource(PromptFileSource source)
      Sets the source of the file, either DYNAMIC (the user must provide the file when executing the query) or STATIC (the file must be uploaded in the query configuration UI). Can be null to indicate that there are no files.
      Parameters:
      source - The source of the file.
    • getStaticFiles

      public List<PromptConfigFile> getStaticFiles()
      Applicable only when the source is STATIC or ANY.

      Gets the configuration for the single static file input parameter that needs to be uploaded in the query configuration UI.

      Returns:
      The configuration for the single static file input parameter.
    • setStaticFiles

      public void setStaticFiles(List<PromptConfigFile> staticFiles)
      Applicable only when the source is STATIC or ANY.

      Sets the configuration for the single static file input parameter that needs to be uploaded in the query configuration UI.

      Parameters:
      staticFiles - The configuration for the single static file input parameter.