wt.workflow.definer
Class EventActionTable

java.lang.Object
  extended bywt.workflow.definer.EventActionTable
All Implemented Interfaces:
Externalizable, Serializable

public class EventActionTable
extends Object
implements Externalizable

Encapsulates event-action mapping of workflow links. Stores the map internally as a comma separated list of event, action pairs. Assumes that both event and actions are represented as Strings.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  boolean dirty
           
private  Hashtable eventActionMap
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private  boolean oldVersion
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static long SMALL_BLOB_VERSION_UID
           
private  String value
           
 
Constructor Summary
EventActionTable()
          Default constructor.
EventActionTable(String value)
          Constructor that takes as parameter the internal representation of the mapping.
 
Method Summary
private  void checkOldVersion(String value)
           
private  void decodeValue()
           
 Object getAction(Object event)
          Returns action associated with event passed as argument.
private  Object getActionObject(String action_str)
           
private  String getActionString(Object action)
           
private  Object getEventObject(String event_str)
           
 Enumeration getEvents()
          Returns enumeration with all events.
private  String getEventString(Object event)
           
protected  String getValue()
          Gets the value of the attribute: value; Internal representation of the mapping: comma separated list of event-action pairs.
 void putEventAction(Object event, Object action)
          Adds event-action pair to the mapping..
 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(EventActionTable thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void removeEvent(Object event)
          Removes event-action pair for the event passed as argument.
private  void setMap()
           
private  void setStringValue()
           
protected  void setValue(String a_Value)
          Sets the value of the attribute: value; Internal representation of the mapping: comma separated list of event-action pairs.
 String toString()
          Retunrs internal representation of mapping.
private  void valueValidate(String a_Value)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

value

private String value

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

SMALL_BLOB_VERSION_UID

public static final long SMALL_BLOB_VERSION_UID
See Also:
Constant Field Values

eventActionMap

private Hashtable eventActionMap

dirty

private boolean dirty

oldVersion

private boolean oldVersion
Constructor Detail

EventActionTable

public EventActionTable()
Default constructor.

Supported API: false


EventActionTable

public EventActionTable(String value)
                 throws DatastoreException
Constructor that takes as parameter the internal representation of the mapping. The internal rewpresentation is a comma separated list of event-action pairs.

Supported API: false

Parameters:
value -
Throws:
DatastoreException
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(EventActionTable 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

getValue

protected String getValue()
Gets the value of the attribute: value; Internal representation of the mapping: comma separated list of event-action pairs.

Supported API: false

Returns:
String

setValue

protected void setValue(String a_Value)
                 throws WTPropertyVetoException
Sets the value of the attribute: value; Internal representation of the mapping: comma separated list of event-action pairs.

Supported API: false

Parameters:
a_Value -
Throws:
WTPropertyVetoException

valueValidate

private void valueValidate(String a_Value)
                    throws WTPropertyVetoException
Parameters:
a_Value -
Throws:
WTPropertyVetoException

toString

public String toString()
Retunrs internal representation of mapping.

Supported API: false

Returns:
String

getAction

public Object getAction(Object event)
Returns action associated with event passed as argument.

Supported API: false

Parameters:
event -
Returns:
Object

putEventAction

public void putEventAction(Object event,
                           Object action)
Adds event-action pair to the mapping..

Supported API: false

Parameters:
event -
action -

getEvents

public Enumeration getEvents()
Returns enumeration with all events.

Supported API: false

Returns:
Enumeration

removeEvent

public void removeEvent(Object event)
Removes event-action pair for the event passed as argument.

Supported API: false

Parameters:
event -

setMap

private void setMap()

setStringValue

private void setStringValue()

checkOldVersion

private void checkOldVersion(String value)

decodeValue

private void decodeValue()

getEventObject

private Object getEventObject(String event_str)

getActionObject

private Object getActionObject(String action_str)

getEventString

private String getEventString(Object event)

getActionString

private String getActionString(Object action)