|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VariableService
The service provided by a variable.
The service is a major part of a variable as it defined its behavior within a workflow. It describes how the element performs during the workflow execution. For a variable, the service provides:
setValue(Object)
getValue()
methods.valueClass()
method.isValidValueClass(Class)
method.setInstanceName(String)
and getInstanceName()
methods
Variable.getService()
Method Summary | |
---|---|
void |
addVariableServiceListener(VariableServiceListener l)
Adds a listener to this variable. |
java.lang.String |
getInstanceName()
Returns the variable instance name. |
java.lang.Object |
getValue()
Returns the current value of the variable. |
boolean |
isEditable()
Defines if the value of the variable can be modified by using the setValue(C) method. |
boolean |
isValidValueClass(java.lang.Class<? extends java.lang.Object> clazz)
Returns true if an instance of the given class is an
acceptable value for the variable. |
void |
removeVariableServiceListener(VariableServiceListener l)
Removes a listener to this variable. |
void |
setInstanceName(java.lang.String name)
Sets the variable instance name. |
java.lang.Object |
setValue(java.lang.Object newValue)
Sets the current value of the variable. |
java.lang.Class<? extends java.lang.Object> |
valueClass()
Returns the type of the object returned by the getValue
method. |
Method Detail |
---|
java.lang.Object getValue()
setValue(Object)
,
valueClass()
java.lang.Object setValue(java.lang.Object newValue) throws InvalidVariableValueException
newValue
- - the new value of the variable.
null
if the
variable had no value before the call of this method.
InvalidVariableValueException
- if an invalid value is trying to be assigned to the variablegetValue()
,
isValidValueClass(Class)
java.lang.Class<? extends java.lang.Object> valueClass()
getValue
method.
getValue
methodgetValue()
boolean isValidValueClass(java.lang.Class<? extends java.lang.Object> clazz)
true
if an instance of the given class is an
acceptable value for the variable.
clazz
- - the clazz
true
if an instance of the given class is an
acceptable value for the variable. false
otherwise.setValue(Object)
java.lang.String getInstanceName()
setInstanceName(String)
void setInstanceName(java.lang.String name) throws InvalidVariableInstanceNameException
name
- - new instance name
InvalidVariableInstanceNameException
- if the instance name is not valid, for example if another
variable in the workflow has a similar instance name.getInstanceName()
boolean isEditable()
setValue(C)
method.
If this methods returns true
, calling the
setValue(C)
method should have no effect.
true
if the value of the variable can be modified by
using the setValue(C)
method. false
otherwise.void addVariableServiceListener(VariableServiceListener l)
l
- - the new listenerremoveVariableServiceListener(VariableServiceListener)
void removeVariableServiceListener(VariableServiceListener l)
l
- - the listener to removeaddVariableServiceListener(VariableServiceListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |