wt.workflow.work
Class WfTallyPolicy

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended bywt.workflow.work.WfTallyPolicy
All Implemented Interfaces:
Cloneable, Evolvable, Externalizable, Map, Serializable

public class WfTallyPolicy
extends Hashtable
implements Externalizable, Evolvable

Tally policies

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Field Summary
private  Vector ballotList
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private  WfTallyType name
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean TALLY_NON_REQUIREDS
           
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
WfTallyPolicy()
           
 
Method Summary
 Vector getBallotList()
          Gets the value of the attribute: ballotList; This is the EventList to tally against.
 WfTallyType getName()
          Gets the value of the attribute: name; The type of tally to perform.
static WfTallyPolicy newWfTallyPolicy()
          

Supported API: false
 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(WfTallyPolicy thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setBallotList(Vector a_BallotList)
          Sets the value of the attribute: ballotList; This is the EventList to tally against.
 void setName(WfTallyType a_Name)
          Sets the value of the attribute: name; The type of tally to perform.
 boolean tallyAll(String event)
          The ALL policy will check each ballot's event list for the presence of the event passed.
 boolean tallyAny(String event)
          The ANY policy will check each ballot's event list for the presence of the event passed in.
 boolean tallyNotPlurality(String event)
          The notPLURALITY policy will check each ballot's event list for the presence of the event passed in.
 boolean tallyNumber(String operator, int value, String event)
          The Number policy will check each ballot's event list for the presence of the event passed in.
 boolean tallyPercent(String operator, int value, String event)
          The Percent policy will check each ballot's event list for the presence of the event passed in.
 boolean tallyPlurality(String event)
          The PLURALITY policy will check each ballot's event list for the presence of the event passed in.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
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 WfTallyType name

ballotList

private Vector ballotList

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

TALLY_NON_REQUIREDS

private static boolean TALLY_NON_REQUIREDS
Constructor Detail

WfTallyPolicy

public WfTallyPolicy()
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(WfTallyPolicy 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

getName

public WfTallyType getName()
Gets the value of the attribute: name; The type of tally to perform.

Supported API: false

Returns:
WfTallyType

setName

public void setName(WfTallyType a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: name; The type of tally to perform.

Supported API: false

Parameters:
a_Name -
Throws:
WTPropertyVetoException

getBallotList

public Vector getBallotList()
Gets the value of the attribute: ballotList; This is the EventList to tally against.

Supported API: false

Returns:
Vector

setBallotList

public void setBallotList(Vector a_BallotList)
                   throws WTPropertyVetoException
Sets the value of the attribute: ballotList; This is the EventList to tally against.

Supported API: false

Parameters:
a_BallotList -
Throws:
WTPropertyVetoException

newWfTallyPolicy

public static WfTallyPolicy newWfTallyPolicy()


Supported API: false

Returns:
WfTallyPolicy

tallyAny

public boolean tallyAny(String event)
                 throws WfException
The ANY policy will check each ballot's event list for the presence of the event passed in. If found in any ballot, return true.

Supported API: false

Parameters:
event -
Returns:
boolean
Throws:
WfException

tallyAll

public boolean tallyAll(String event)
                 throws WfException
The ALL policy will check each ballot's event list for the presence of the event passed. If found in every ballot, return true.

Supported API: false

Parameters:
event -
Returns:
boolean
Throws:
WfException

tallyPlurality

public boolean tallyPlurality(String event)
                       throws WfException
The PLURALITY policy will check each ballot's event list for the presence of the event passed in. If the event's occurance count is the highest, return true.

Supported API: false

Parameters:
event -
Returns:
boolean
Throws:
WfException

tallyNotPlurality

public boolean tallyNotPlurality(String event)
                          throws WfException
The notPLURALITY policy will check each ballot's event list for the presence of the event passed in. If it's occurance count is the lowest, return true.

Supported API: false

Parameters:
event -
Returns:
boolean
Throws:
WfException

tallyPercent

public boolean tallyPercent(String operator,
                            int value,
                            String event)
                     throws WfException
The Percent policy will check each ballot's event list for the presence of the event passed in. Then the percentage is determined by dividing the occurance count by the number of ballots and multiplying by 100. This percentage is compared to the percentage value passed in as determined by the operator passed in on the call. The result of this comparison is return.

Supported API: false

Parameters:
operator -
value -
event -
Returns:
boolean
Throws:
WfException

tallyNumber

public boolean tallyNumber(String operator,
                           int value,
                           String event)
                    throws WfException
The Number policy will check each ballot's event list for the presence of the event passed in. If found in a minimum of N number of ballots, return true. N is an integer value passed on the call to this method.

Supported API: false

Parameters:
operator -
value -
event -
Returns:
boolean
Throws:
WfException