Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.core.annotations
Annotation Type Param


@Retention(value=RUNTIME)
@Target(value=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:
OperationParameters

Required Element Summary
 java.lang.String name
          The parameter key in the operation parameters map.
 
Optional Element Summary
 int order
          Optional attribute to set a parameter order, used for ordering them when presenting the UI form to fill.
 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).
 java.lang.String[] values
          Optional attribute - useful to generate operation documentation.
 java.lang.String widget
          Optional attribute - useful to generate operation documentation.
 

Element Detail

name

public abstract java.lang.String name
The parameter key in the operation parameters map.

required

public abstract 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

public abstract java.lang.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

public abstract java.lang.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

public abstract int order
Optional attribute to set a parameter order, used for ordering them when presenting the UI form to fill.

Default:
0

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.