public class OperationExecutionContext
extends java.lang.Object
Java class is the context of the execution of an operation, represented as a list of properties.| Modifier and Type | Field and Description |
|---|---|
static OperationExecutionContext |
EMPTY_OPERATION_EXECUTION_CONTEXT
The empty operation execution context.
|
| Constructor and Description |
|---|
OperationExecutionContext()
Initializes an operation execution context.
|
OperationExecutionContext(PropertyList properties)
Initializes an operation execution context with a property list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Property prop)
Adds a property to this context.
|
OperationExecutionContext |
duplicate()
Returns a copy of this context, containing a copy of each of its properties.
|
PropertyList |
getProperties()
Returns the properties of this context.
|
int |
getPropertyCount()
Returns the count of the properties of this context.
|
void |
merge(OperationExecutionContext context,
boolean updateKnownProperties)
Merges the properties of the specified context with this properties.
|
public static final OperationExecutionContext EMPTY_OPERATION_EXECUTION_CONTEXT
public OperationExecutionContext()
public OperationExecutionContext(PropertyList properties)
properties - The property list which contains the property of this context. If null, then a new list is created.public int getPropertyCount()
public PropertyList getProperties()
Notice that it is the nested property list that is returned and so all the update done on the list are done one this context properties.
PropertyList that contains all the properties of this contextpublic void add(Property prop) throws java.lang.IllegalArgumentException
Only valid property can be added to this context. A valid property has a not empty name and a known type.
prop - The property to be added. Can be null but the context is not updated.java.lang.IllegalArgumentException - if the property is not a valuepublic void merge(OperationExecutionContext context, boolean updateKnownProperties)
Here is an example of context merging with the specified context 'c2' has two properties 'p1' and 'p2=value2' and this context 'c1' has 'p2=value1' and 'p3'.
Then if 'updateKnownProperties' is 'true' then the context 'c1' will have the following properties: 'p1', 'p2=value2', 'p3'
Then if 'updateKnownProperties' is 'false' then the context 'c1': 'p1', 'p2=value1', 'p3'
context - The context which must be merged with this context. Null 'context' supported.updateKnownProperties - true if the properties which already exists in this context must be updated or notpublic OperationExecutionContext duplicate()