Class PromptQueryActionViewModel
java.lang.Object
de.xima.fc.workflow.designer.model.prompt_query.PromptQueryActionViewModel
- All Implemented Interfaces:
Serializable
View model for the prompt query workflow action configuration UI.
- Since:
- 8.5.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPromptQueryActionViewModel(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
Modifier and TypeMethodDescriptiongetError()Gets the error message if an error occurred while loading the configuration for the selected prompt query.List<FileControl<?>> Gets the file controls for the file inputs.Gets thedynamic form modelfor the JSON input parameters of the selected prompt query.booleanWhether this model represents a prompt query that could not be loaded correctly.booleanWhether the currently selected prompt query produces file outputs.
-
Constructor Details
-
PromptQueryActionViewModel
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 Details
-
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
Gets the file controls for the file inputs.- Returns:
- The list of file controls.
-
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.
-