wt.workflow.engine
Class WfVariable

java.lang.Object
  extended bywt.workflow.engine.WfVariable
All Implemented Interfaces:
Evolvable, Externalizable, NetFactor, Serializable

public class WfVariable
extends Object
implements Externalizable, NetFactor, Evolvable

Name-value pair. The name is a string and the value must be serializable so it can be stored in the database. Some additional attributes are the type name and whether the variable is required.

Use the newWfVariable static factory method(s), not the WfVariable constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String BOOLEAN
           
private static String BYTE
           
private static String CHAR
           
private static String CLASSNAME
           
private  HashMap displayNameMap
           
private static String DOUBLE
           
private static ClassInfo ENUMERATEDTYPE
           
static long EXTERNALIZATION_VERSION_UID
           
private static String FLOAT
           
private static String INT
           
private static String LONG
           
private  String name
           
private static String OBJECT_REFERENCE
           
protected static long OLD_FORMAT_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID_1
           
protected static long OLD_FORMAT_VERSION_UID_2
           
protected static long OLD_FORMAT_VERSION_UID_3
           
private  PermissionSet permissionList
           
private static ClassInfo PERSISTABLE
           
private static String PROXY_GROUP
           
private static String PROXY_USER
           
private  boolean readOnly
           
private  boolean required
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static String SHORT
           
private  String typeName
           
private  Object value
           
private static String VECTOR_CLASS_NAME
           
private static boolean VERBOSE
           
private static ClassInfo WTREFERENCE
           
 
Constructor Summary
WfVariable()
           
 
Method Summary
 WfVariable copy()
          

Supported API: false
 boolean equals(Object obj)
          Returns true is the object passed as argument is equal to the current object.
 ClassInfo getClassInfo()
          Returns the ClassInfo object for this class.
 String getConceptualClassname()
          Deprecated.  
 String getDisplayName()
          Returns the default displayNameMap entry.
 String getDisplayName(Locale locale)
          Returns the displayNameMap entry for the specified Locale if it exists.
 HashMap getDisplayNameMap()
          Gets the value of the attribute: displayNameMap; Map of locale String representations to displayName for that locale.
 String getName()
          Gets the value of the attribute: name; Name of the variable.
 PermissionSet getPermissionList()
          Gets the value of the attribute: permissionList; permissionList stores the set of perrmissions granted to the task participant over the object referenced by the variable.
 String getTypeName()
          Gets the value of the attribute: typeName; String representing the variable value's type.
 Object getValue()
          Gets the value of the attribute: value; Variable's value.
 Object getValueObject()
          Returns the value of the variable without any conversion.
 Class getVariableClass()
          Returns the class of the variable.
protected  Vector getVector()
          Returns the default value as a Vector object.
 int hashCode()
          Returns the hash code of the object.
protected  void initialize()
          Supports initialization, following construction of an instance.
private  boolean isPrimitive()
          Returns true if variable holds a prmitive Java type; false otherwise.
 boolean isReadOnly()
          Gets the value of the attribute: readOnly; Determines whether the variable can be modified by the assignee of a task.
 boolean isRequired()
          Gets the value of the attribute: required; Tells whether the variable is ('true') or not required ('false').
protected  boolean isValidValue(Object value)
          Returns whether the value passed as argument can be set, given the variables type.
static WfVariable newWfVariable()
          Default factory for the class.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WfVariable thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  Object replaceProxyUser(String pRef)
           
 void setDisplayNameMap(HashMap a_DisplayNameMap)
          Sets the value of the attribute: displayNameMap; Map of locale String representations to displayName for that locale.
 void setName(String a_Name)
          Sets the value of the attribute: name; Name of the variable.
 void setPermissionList(PermissionSet a_PermissionList)
          Sets the value of the attribute: permissionList; permissionList stores the set of perrmissions granted to the task participant over the object referenced by the variable.
 void setReadOnly(boolean a_ReadOnly)
          Sets the value of the attribute: readOnly; Determines whether the variable can be modified by the assignee of a task.
 void setRequired(boolean a_Required)
          Sets the value of the attribute: required; Tells whether the variable is ('true') or not required ('false').
 void setTypeName(String a_TypeName)
          Sets the value of the attribute: typeName; String representing the variable value's type.
 void setValue(Object a_Value)
          Sets the value of the attribute: value; Variable's value.
 void setValueObject(Object a_value)
          Sets the value of the variable to the value passed as argument.
protected  void setVector(Vector vect_obj)
          Sets the default value to be the vector passed as argument.
 String toString()
          Returns the conceptual (modeled) name for the class.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

name

private String name

value

private Object value

typeName

private String typeName

required

private boolean required

permissionList

private PermissionSet permissionList

readOnly

private boolean readOnly

displayNameMap

private HashMap displayNameMap

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID_1

protected static final long OLD_FORMAT_VERSION_UID_1
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID_2

protected static final long OLD_FORMAT_VERSION_UID_2
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID_3

protected static final long OLD_FORMAT_VERSION_UID_3
See Also:
Constant Field Values

VECTOR_CLASS_NAME

private static final String VECTOR_CLASS_NAME

BOOLEAN

private static final String BOOLEAN
See Also:
Constant Field Values

BYTE

private static final String BYTE
See Also:
Constant Field Values

CHAR

private static final String CHAR
See Also:
Constant Field Values

DOUBLE

private static final String DOUBLE
See Also:
Constant Field Values

FLOAT

private static final String FLOAT
See Also:
Constant Field Values

INT

private static final String INT
See Also:
Constant Field Values

LONG

private static final String LONG
See Also:
Constant Field Values

SHORT

private static final String SHORT
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

PERSISTABLE

private static ClassInfo PERSISTABLE

WTREFERENCE

private static ClassInfo WTREFERENCE

ENUMERATEDTYPE

private static ClassInfo ENUMERATEDTYPE

PROXY_USER

private static final String PROXY_USER
See Also:
Constant Field Values

PROXY_GROUP

private static final String PROXY_GROUP
See Also:
Constant Field Values

OBJECT_REFERENCE

private static final String OBJECT_REFERENCE
See Also:
Constant Field Values
Constructor Detail

WfVariable

public WfVariable()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfVariable thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

toString

public String toString()
Returns the conceptual (modeled) name for the class.

Supported API: false

Returns:
String

getClassInfo

public ClassInfo getClassInfo()
                       throws WTIntrospectionException
Returns the ClassInfo object for this class.

Supported API: false

Specified by:
getClassInfo in interface NetFactor
Returns:
ClassInfo
Throws:
WTIntrospectionException

getName

public String getName()
Gets the value of the attribute: name; Name of the variable. The name is the same as the name of the WfVariableInfo used to generate the variable.

Supported API: false

Returns:
String

setName

public void setName(String a_Name)
Sets the value of the attribute: name; Name of the variable. The name is the same as the name of the WfVariableInfo used to generate the variable.

Supported API: false

Parameters:
a_Name -

getValue

public Object getValue()
Gets the value of the attribute: value; Variable's value.

Supported API: false

Returns:
Object

setValue

public void setValue(Object a_Value)
Sets the value of the attribute: value; Variable's value.

Supported API: false

Parameters:
a_Value -

getTypeName

public String getTypeName()
Gets the value of the attribute: typeName; String representing the variable value's type.

Supported API: false

Returns:
String

setTypeName

public void setTypeName(String a_TypeName)
Sets the value of the attribute: typeName; String representing the variable value's type.

Supported API: false

Parameters:
a_TypeName -

isRequired

public boolean isRequired()
Gets the value of the attribute: required; Tells whether the variable is ('true') or not required ('false').

Supported API: false

Returns:
boolean

setRequired

public void setRequired(boolean a_Required)
Sets the value of the attribute: required; Tells whether the variable is ('true') or not required ('false').

Supported API: false

Parameters:
a_Required -

getPermissionList

public PermissionSet getPermissionList()
Gets the value of the attribute: permissionList; permissionList stores the set of perrmissions granted to the task participant over the object referenced by the variable.

Supported API: false

Returns:
PermissionSet

setPermissionList

public void setPermissionList(PermissionSet a_PermissionList)
Sets the value of the attribute: permissionList; permissionList stores the set of perrmissions granted to the task participant over the object referenced by the variable.

Supported API: false

Parameters:
a_PermissionList -

isReadOnly

public boolean isReadOnly()
Gets the value of the attribute: readOnly; Determines whether the variable can be modified by the assignee of a task. Not enforced internally, just used by the GUI.

Supported API: false

Returns:
boolean

setReadOnly

public void setReadOnly(boolean a_ReadOnly)
Sets the value of the attribute: readOnly; Determines whether the variable can be modified by the assignee of a task. Not enforced internally, just used by the GUI.

Supported API: false

Parameters:
a_ReadOnly -

getDisplayNameMap

public HashMap getDisplayNameMap()
Gets the value of the attribute: displayNameMap; Map of locale String representations to displayName for that locale. These values are the same as the values for the WfVariableInfo used to generate the variable.

Supported API: false

Returns:
HashMap

setDisplayNameMap

public void setDisplayNameMap(HashMap a_DisplayNameMap)
Sets the value of the attribute: displayNameMap; Map of locale String representations to displayName for that locale. These values are the same as the values for the WfVariableInfo used to generate the variable.

Supported API: false

Parameters:
a_DisplayNameMap -

equals

public boolean equals(Object obj)
Returns true is the object passed as argument is equal to the current object.

Supported API: false

Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns the hash code of the object.

Supported API: false

Returns:
int

getVariableClass

public Class getVariableClass()
Returns the class of the variable.

Supported API: false

Returns:
Class

copy

public WfVariable copy()
                throws WTException


Supported API: false

Returns:
WfVariable
Throws:
WTException

getDisplayName

public String getDisplayName(Locale locale)
Returns the displayNameMap entry for the specified Locale if it exists. If it does not, it defaults to the default entry. If this does not exist, the variable Name is returned.

Supported API: false

Parameters:
locale -
Returns:
String

getDisplayName

public String getDisplayName()
Returns the default displayNameMap entry. If this does not exist, the varialbe Name is returned.

Supported API: false

Returns:
String

newWfVariable

public static WfVariable newWfVariable()
                                throws WTException
Default factory for the class.

Supported API: false

Returns:
WfVariable
Throws:
WTException

initialize

protected void initialize()
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Throws:
WTException

isValidValue

protected boolean isValidValue(Object value)
Returns whether the value passed as argument can be set, given the variables type.

Parameters:
value - object to be set
Returns:
boolean

isPrimitive

private boolean isPrimitive()
Returns true if variable holds a prmitive Java type; false otherwise.

Assumes getTypeName () != null


setVector

protected void setVector(Vector vect_obj)
                  throws ClassNotFoundException,
                         IOException,
                         WTException
Sets the default value to be the vector passed as argument.

Parameters:
vect_obj -
Throws:
ClassNotFoundException
IOException
WTException

getVector

protected Vector getVector()
                    throws ClassNotFoundException,
                           IOException,
                           WTException
Returns the default value as a Vector object.

Returns:
Vector
Throws:
ClassNotFoundException
IOException
WTException

setValueObject

public void setValueObject(Object a_value)
Sets the value of the variable to the value passed as argument. Used internally for data transfer between activity and process.


getValueObject

public Object getValueObject()
Returns the value of the variable without any conversion. Used internallyfor data transfer between activity and process.

Returns:
Object

replaceProxyUser

private Object replaceProxyUser(String pRef)