Class Parameter.Factory
java.lang.Object
de.espirit.firstspirit.client.plugin.report.Parameter.Factory
Factory for creation of different
Parameter
types.- Since:
- 5.1.19
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParameterBoolean
createBoolean
(String name, @Nullable String label, @Nullable Boolean defaultValue) Creates a new Boolean-typed parameter, using the given attributes.static ParameterSelect
createSelect
(String name, @Nullable List<ParameterSelect.SelectItem> items, @Nullable String defaultValue) Creates a new String-typed selection parameter, using the given attributes.static ParameterSelect.SelectItem
createSelectItem
(String label, String value) Creates a new SelectItem, based on the given parameter.static ParameterText
createText
(String name, @Nullable String placeholder, @Nullable String defaultValue) Creates a new String-typed text input parameter, using the given attributes.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
createBoolean
public static ParameterBoolean createBoolean(String name, @Nullable @Nullable String label, @Nullable @Nullable Boolean defaultValue) Creates a new Boolean-typed parameter, using the given attributes.- Parameters:
name
- Name of this parameter, must be unique within aReportPlugin
.label
- The label for the related checkbox on client side.defaultValue
- The default value of this parameter.- Returns:
- newly create
ParameterBoolean
instance - Since:
- 5.1.19
-
createSelect
public static ParameterSelect createSelect(String name, @Nullable @Nullable List<ParameterSelect.SelectItem> items, @Nullable @Nullable String defaultValue) Creates a new String-typed selection parameter, using the given attributes.- Parameters:
name
- Name of this parameter, must be unique within aReportPlugin
.items
- List of selectable items for the related listbox on client side.defaultValue
- The default value of this parameter.- Returns:
- newly create
ParameterSelect
instance - Since:
- 5.1.19
-
createSelectItem
Creates a new SelectItem, based on the given parameter.- Parameters:
label
- The label of this item.value
- The value of this item.- Returns:
- newly create
ParameterSelect.SelectItem
instance - Since:
- 5.1.19
-
createText
public static ParameterText createText(String name, @Nullable @Nullable String placeholder, @Nullable @Nullable String defaultValue) Creates a new String-typed text input parameter, using the given attributes.- Parameters:
name
- Name of this parameter, must be unique within aReportPlugin
.placeholder
- The default text, if the related textfield is empty. The string will not be used as a value.defaultValue
- The default value of this parameter.- Returns:
- newly create
ParameterText
instance - Since:
- 5.1.19
-