Class Parameter.Factory

java.lang.Object
de.espirit.firstspirit.client.plugin.report.Parameter.Factory
Enclosing interface:
Parameter<T>

public static class Parameter.Factory extends Object
Factory for creation of different Parameter types.
Since:
5.1.19
  • 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 a ReportPlugin.
      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 a ReportPlugin.
      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

      public static ParameterSelect.SelectItem createSelectItem(String label, String value)
      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 a ReportPlugin.
      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