Annotation Interface Param


@Retention(RUNTIME) @Target(FIELD) public @interface Param
To be used on an operation field to inject operation parameters from the current context. If the parameter to inject cannot be found in the operation parameters map (or it is set to null) then if required is true then an error is thrown otherwise the injection will not be done (and any default value set in the code will be preserved). The default is true - i.e. do not allow missing entries in operation parameter map.
Author:
Bogdan Stefanescu
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The parameter key in the operation parameters map.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional alias for the parameter key.
     
    int
    Optional attribute to set a parameter order, used for ordering them when presenting the UI form to fill.
    boolean
    If the parameter to inject cannot be found in the operation parameters map (or it is set to null) then if required is true then an error is thrown otherwise the injection will not be done (and any default value set in the code will be preserved).
    Optional attribute - useful to generate operation documentation.
    Optional attribute - useful to generate operation documentation.
  • Element Details

    • name

      String name
      The parameter key in the operation parameters map.
    • description

      String description
      Since:
      5.7.3 The parameter description to explicit its purpose.
      Default:
      ""
    • required

      boolean required
      If the parameter to inject cannot be found in the operation parameters map (or it is set to null) then if required is true then an error is thrown otherwise the injection will not be done (and any default value set in the code will be preserved). The default is true - i.e. do not allow missing entries in operation parameter map.
      Default:
      true
    • widget

      String widget
      Optional attribute - useful to generate operation documentation. Provide a widget type to be used by the UI to edit this parameter. If no widget is provided the default mechanism is to choose a widget compatible with the parameter type. For example if the parameter has the type String the default is to use a TextBox but you can override this by specifying a custom widget type like ListBox, TextArea etc.
      Default:
      ""
    • values

      String[] values
      Optional attribute - useful to generate operation documentation. Provide default values for the parameter widget. If the parameter is rendered using a ListBox or ComboBox then this attribute can be used to hold the choices available in the list. If the widget is not a list then this can be used to specify the default value for the widget.
      Default:
      {}
    • order

      int order
      Optional attribute to set a parameter order, used for ordering them when presenting the UI form to fill.
      Default:
      0
    • alias

      String[] alias
      Optional alias for the parameter key. If the operation parameters map does not contain the name, then alias will be used if any.
      Since:
      5.9.2
      Default:
      {}