SMILA (incubation) API documentation

org.eclipse.smila.jobmanager
Class DefinitionBase

java.lang.Object
  extended by org.eclipse.smila.jobmanager.DefinitionBase
Direct Known Subclasses:
BucketDefinition, DataObjectTypeDefinition, JobDefinition, ParameterDefinition, WorkerDefinition, WorkflowDefinition

public class DefinitionBase
extends java.lang.Object

Base class for job processign element's definitions.


Field Summary
protected  AnyMap _anyMap
          Any Map from creation, so additional properties from the AnyMap parsed are retained.
protected  java.lang.String _name
          The name of the worker definition (mandatory).
protected  boolean _readOnly
          optional read-only flag.
protected  java.util.Date _timestamp
          optional timestamp for this definition.
static java.lang.String KEY_NAME
          Property for name in json.
static java.lang.String KEY_READ_ONLY
          Property for readOnly in json.
static java.lang.String KEY_TIMESTAMP
          timestamp for this workflow (optional).
 
Constructor Summary
  DefinitionBase(AnyMap definitionAny)
          Constructor for WorkerDefinition.
protected DefinitionBase(java.lang.String name)
          Create a new DefinitionBase from an overriding definition.
 
Method Summary
 java.lang.String getName()
           
 java.util.Date getTimestamp()
           
 boolean isReadOnly()
           
 AnyMap toAny()
          Returns the object as an Any representation.
 AnyMap toAny(boolean includingAdditionalAttributes)
          Returns object information as an Any representation.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_TIMESTAMP

public static final java.lang.String KEY_TIMESTAMP
timestamp for this workflow (optional).

See Also:
Constant Field Values

KEY_NAME

public static final java.lang.String KEY_NAME
Property for name in json.

See Also:
Constant Field Values

KEY_READ_ONLY

public static final java.lang.String KEY_READ_ONLY
Property for readOnly in json.

See Also:
Constant Field Values

_name

protected final java.lang.String _name
The name of the worker definition (mandatory).


_anyMap

protected final AnyMap _anyMap
Any Map from creation, so additional properties from the AnyMap parsed are retained.


_timestamp

protected final java.util.Date _timestamp
optional timestamp for this definition.


_readOnly

protected final boolean _readOnly
optional read-only flag.

Constructor Detail

DefinitionBase

public DefinitionBase(AnyMap definitionAny)
               throws InvalidConfigException
Constructor for WorkerDefinition.

Parameters:
definitionAny - The any Object with one definition
Throws:
InvalidConfigException - exception if the any object is not filled with all desired values

DefinitionBase

protected DefinitionBase(java.lang.String name)
Create a new DefinitionBase from an overriding definition. Timestamp will be set to "now", readonly will be false.

Parameters:
name - the name of the definition.
Method Detail

getName

public java.lang.String getName()
Returns:
the name

getTimestamp

public java.util.Date getTimestamp()
Returns:
the timestamp.

isReadOnly

public boolean isReadOnly()
Returns:
the readOnly flag.

toAny

public AnyMap toAny()
Returns the object as an Any representation.

Returns:
Any object describing this workflow definition.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

toAny

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

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.

SMILA (incubation) API documentation