Class PromptQueryActionViewModel
- java.lang.Object
-
- de.xima.fc.workflow.designer.model.prompt_query.PromptQueryActionViewModel
-
- All Implemented Interfaces:
Serializable
public final class PromptQueryActionViewModel extends Object implements Serializable
View model for the prompt query workflow action configuration UI.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PromptQueryActionViewModel(ValueDescriptorFormModel jsonPropertiesForm, List<FileControl<?>> fileControls, boolean producesFiles)Creates a new view model for the prompt query action configuration UI; when the configuration could be loaded successfully.PromptQueryActionViewModel(String error)Creates a new view model for the prompt query action configuration UI; when an error occurred.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetError()Gets the error message if an error occurred while loading the configuration for the selected prompt query.List<FileControl<?>>getFileControls()Gets the file controls for the file inputs.ValueDescriptorFormModelgetJsonPropertiesForm()Gets thedynamic form modelfor the JSON input parameters of the selected prompt query.booleanisHasError()Whether this model represents a prompt query that could not be loaded correctly.booleanisProducesFiles()Whether the currently selected prompt query produces file outputs.
-
-
-
Constructor Detail
-
PromptQueryActionViewModel
public PromptQueryActionViewModel(String error)
Creates a new view model for the prompt query action configuration UI; when an error occurred.
-
PromptQueryActionViewModel
public PromptQueryActionViewModel(ValueDescriptorFormModel jsonPropertiesForm, List<FileControl<?>> fileControls, boolean producesFiles)
Creates a new view model for the prompt query action configuration UI; when the configuration could be loaded successfully.- Parameters:
jsonPropertiesForm- The dynamic form model for the JSON input parameters of the selected prompt query.fileControls- The controls for editing the file parameters.producesFiles- Whether the selected prompt query produces file outputs.
-
-
Method Detail
-
getError
public String getError()
Gets the error message if an error occurred while loading the configuration for the selected prompt query.- Returns:
- The error message, or null if no error occurred.
-
getFileControls
public List<FileControl<?>> getFileControls()
Gets the file controls for the file inputs.- Returns:
- The list of file controls.
-
getJsonPropertiesForm
public ValueDescriptorFormModel getJsonPropertiesForm()
Gets thedynamic form modelfor the JSON input parameters of the selected prompt query. Each prompt query may have a different set of input parameters. This dynamic form model reflects the structure of those parameters.- Returns:
- The dynamic form model for the input parameters.
-
isHasError
public boolean isHasError()
Whether this model represents a prompt query that could not be loaded correctly. An error usually occurs due to a missing plugin or an error in the plugin that handles the prompt query. When this returns true,getJsonPropertiesForm()and other methods will return empty or null values. UsegetError()to get the error message.- Returns:
- true if there is an error, false otherwise.
-
isProducesFiles
public boolean isProducesFiles()
Whether the currently selected prompt query produces file outputs.- Returns:
- true if the prompt query produces file outputs, false otherwise.
-
-