SMILA (incubation) API documentation

org.eclipse.smila.jobmanager
Class ParameterDefinition

java.lang.Object
  extended by org.eclipse.smila.jobmanager.DefinitionBase
      extended by org.eclipse.smila.jobmanager.ParameterDefinition

public class ParameterDefinition
extends DefinitionBase

parsed form of parameter definitions.


Field Summary
static java.lang.String KEY_ENTRIES
          parameter property: list of entries of map parameters.
static java.lang.String KEY_MULTI
          parameter property: multiple values allowed?
static java.lang.String KEY_OPTIONAL
          property for optional parameters.
static java.lang.String KEY_TYPE
          property for type of parameters.
static java.lang.String KEY_VALUES
          parameter property: list of accepted values.
static java.lang.String[] MAIN_PARAMETER_KEYS
          parameter property keys to keep when creating a description without details.
static java.lang.String TYPENAME_ANY
          external name of type "any".
static java.lang.String VARIABLE_NAME_EXPRESSION
          the expression denoting a variable parameter name.
 
Fields inherited from class org.eclipse.smila.jobmanager.DefinitionBase
_anyMap, _name, _readOnly, _timestamp, KEY_NAME, KEY_READ_ONLY, KEY_TIMESTAMP
 
Constructor Summary
ParameterDefinition(AnyMap definitionAny)
          constructor to parse a definition from an Any.
 
Method Summary
 java.util.List<ParameterDefinition> getEntries()
          list of allowed entries for map parameters, null if not defined or for other types.
 Any.ValueType getType()
           
 java.lang.String getTypeName()
           
 java.util.List<Value> getValues()
          list of allowed values, null if not defined or for map/any types.
 boolean isMulti()
          is it allowed for this parameter to have multiple values?
 boolean isOptional()
          is this an optional parameter?
static java.util.List<ParameterDefinition> parseParameters(AnySeq parameterSequence)
          parse parameter defintion from a AnySeq.
 AnyMap toAny(boolean includingAdditionalAttributes)
          Returns object information as an Any representation.
static AnySeq toAny(java.util.List<ParameterDefinition> parameters, boolean includingAdditionalAttributes)
           
 
Methods inherited from class org.eclipse.smila.jobmanager.DefinitionBase
getName, getTimestamp, isReadOnly, toAny, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPENAME_ANY

public static final java.lang.String TYPENAME_ANY
external name of type "any".

See Also:
Constant Field Values

KEY_TYPE

public static final java.lang.String KEY_TYPE
property for type of parameters.

See Also:
Constant Field Values

KEY_OPTIONAL

public static final java.lang.String KEY_OPTIONAL
property for optional parameters.

See Also:
Constant Field Values

KEY_VALUES

public static final java.lang.String KEY_VALUES
parameter property: list of accepted values.

See Also:
Constant Field Values

KEY_MULTI

public static final java.lang.String KEY_MULTI
parameter property: multiple values allowed?

See Also:
Constant Field Values

KEY_ENTRIES

public static final java.lang.String KEY_ENTRIES
parameter property: list of entries of map parameters.

See Also:
Constant Field Values

MAIN_PARAMETER_KEYS

public static final java.lang.String[] MAIN_PARAMETER_KEYS
parameter property keys to keep when creating a description without details.


VARIABLE_NAME_EXPRESSION

public static final java.lang.String VARIABLE_NAME_EXPRESSION
the expression denoting a variable parameter name.

See Also:
Constant Field Values
Constructor Detail

ParameterDefinition

public ParameterDefinition(AnyMap definitionAny)
                    throws InvalidConfigException
constructor to parse a definition from an Any.

Throws:
InvalidConfigException
Method Detail

toAny

public static AnySeq toAny(java.util.List<ParameterDefinition> parameters,
                           boolean includingAdditionalAttributes)
Parameters:
parameters - parameters with additional attributes.
Returns:
parameters without additional information, i.e. only the keys listed in MAIN_PARAMETER_KEYS and the parameters in KEY_ENTRIES "withoutAdditionalInformation", will be set for each parameter.

toAny

public AnyMap toAny(boolean includingAdditionalAttributes)
Returns object information as an Any representation.

Overrides:
toAny in class DefinitionBase
Parameters:
includingAdditionalAttributes - 'true' if also any additional information in the AnyMap should be returned, 'false' if only the (minimal set of) relevant information should be returned.
Returns:
Any object describing this workflow definition.

parseParameters

public static java.util.List<ParameterDefinition> parseParameters(AnySeq parameterSequence)
                                                           throws InvalidConfigException
parse parameter defintion from a AnySeq.

Throws:
InvalidConfigException

getType

public Any.ValueType getType()
Returns:
the parameter's type. null for "any".

getTypeName

public java.lang.String getTypeName()
Returns:
external name of type, either Enum.name() (in lower case), or TYPENAME_ANY, if type is null.

isOptional

public boolean isOptional()
is this an optional parameter?


isMulti

public boolean isMulti()
is it allowed for this parameter to have multiple values?


getValues

public java.util.List<Value> getValues()
list of allowed values, null if not defined or for map/any types.


getEntries

public java.util.List<ParameterDefinition> getEntries()
list of allowed entries for map parameters, null if not defined or for other types.


SMILA (incubation) API documentation