Package ro.sync.ecss.extensions.api
Class ArgumentDescriptor
java.lang.Object
ro.sync.ecss.extensions.api.ArgumentDescriptor
Descriptor class for an author operation argument.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]
The array containing the allowed values for the arguments with type TYPE_CONSTANTS_LIST.protected String
The default value of the argument.protected String
The string argument description.protected String
The argument name.protected int
The argument type, can be one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,static final int
List of constant strings argument type.static final int
XML fragment argument type.static final int
An argument of this type is a Java object represented as a Map.static final int
Script type (XSLT or XQuery).static final int
String argument type.static final int
Xpath expression argument type. -
Constructor Summary
ConstructorsConstructorDescriptionArgumentDescriptor
(String name, int type, String description) Constructor of the argument descriptor class.ArgumentDescriptor
(String name, int type, String description, String defaultValue) Constructor of the argument descriptor class.ArgumentDescriptor
(String name, int type, String description, String[] allowedValues, String defaultValue) Constructor of the argument descriptor class. -
Method Summary
-
Field Details
-
TYPE_STRING
public static final int TYPE_STRINGString argument type. The value is0
.- See Also:
-
TYPE_FRAGMENT
public static final int TYPE_FRAGMENTXML fragment argument type. It is represented as aString
The value is1
.- See Also:
-
TYPE_XPATH_EXPRESSION
public static final int TYPE_XPATH_EXPRESSIONXpath expression argument type. It is represented as aString
The value is2
.- See Also:
-
TYPE_CONSTANT_LIST
public static final int TYPE_CONSTANT_LISTList of constant strings argument type. The value is3
.- See Also:
-
TYPE_SCRIPT
public static final int TYPE_SCRIPTScript type (XSLT or XQuery). It is represented as aString
The value is4
.- See Also:
-
TYPE_JAVA_OBJECT
public static final int TYPE_JAVA_OBJECTAn argument of this type is a Java object represented as a Map. This Map is interpreted by the operation that receives it.- See Also:
-
name
The argument name. -
type
protected int typeThe argument type, can be one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
, -
description
The string argument description. -
allowedValues
The array containing the allowed values for the arguments with type TYPE_CONSTANTS_LIST. -
defaultValue
The default value of the argument.
-
-
Constructor Details
-
ArgumentDescriptor
Constructor of the argument descriptor class.- Parameters:
name
- The name of the argument.type
- The type of the argument, one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,description
- The description of the argument.
-
ArgumentDescriptor
Constructor of the argument descriptor class.- Parameters:
name
- The name of the argument.type
- The type of the argument, one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,description
- The description of the argument.defaultValue
- The default value of the argument.
-
ArgumentDescriptor
public ArgumentDescriptor(String name, int type, String description, String[] allowedValues, String defaultValue) Constructor of the argument descriptor class.- Parameters:
name
- The name of the argument.type
- The type of the argument, one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,description
- The description of the argument.allowedValues
- The allowed values for the defined argument.defaultValue
- The default value of the argument.
-
-
Method Details
-
getName
- Returns:
- The name of the argument.
-
getType
public int getType()- Returns:
- The type of the argument, one of:
TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,
-
getDescription
- Returns:
- The description of the argument.
-
decodeType
Returns aString
description of the given argument type.- Parameters:
type
- The argument type, one of:TYPE_STRING
,TYPE_FRAGMENT
,TYPE_SCRIPT
,TYPE_XPATH_EXPRESSION
,TYPE_CONSTANT_LIST
,- Returns:
- The type description, or
null
if the type is not valid.
-
getAllowedValues
- Returns:
- The array with allowed values.
Is used for
TYPE_CONSTANTS_LIST
arguments.
-
getDefaultValue
- Returns:
- The default value of the argument.
-
toString
-