wt.workflow
Class TableLoaderAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bywt.clients.beans.table.WTTableAction
          extended bywt.workflow.TableLoaderAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
AdminLoadAction, AssociatedProcessLoadAction, UserLoadAction

public abstract class TableLoaderAction
extends WTTableAction
implements Serializable

TableLoaderAction populates a table model with formated work item data. The table model is supplied to a TableProcessor for display in an html page.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private static String ACTION_RESOURCE
           
private static int CHUNKSIZE
           
private static ClassInfo ciPERSISTABLE
           
private static ClassInfo ciWTREFERENCE
           
private static String CLASSNAME
           
private static Class cWFACTIVITY
           
private static Class cWFBLOCK
           
private static Class cWFPROCESS
           
private static boolean DISABLE_LOBS
           
private  Vector displayColumns
           
private  Locale locale
           
private static boolean PRE_QUERY_PERSISTABLES
           
private static ResourceBundle rb
           
private static String RESOURCE
           
protected static String TABLE_COLUMN
           
private static boolean VERBOSE
           
private static String versionID
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
TableLoaderAction(String name)
           
 
Method Summary
private  Hashtable getActivityMap(Vector itemVector)
           
(package private)  Vector getDisplayColumns()
           
(package private)  Locale getLocale()
           
private static WTReference getPBOReference(WfProcess wfprocess)
           
private  Hashtable getPrimaryBusinessObjectMap(Hashtable processMap)
          Return a Hashtable containing the Process' PrimaryBusinessObjects The key is either ObjectReference or VersionForeignKey
private  Hashtable getProcessMap(Hashtable activityMap)
          For all activities in the activityMap, find the corresponding WfProcess.
 void loadTableItems(Enumeration tableItemList, WTTableModel model, String actionName)
          Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file.
 void loadTableItems(Enumeration tableItemList, WTTableModel model, String actionName, Locale aLocale)
          Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file.
 void loadTableItems(Enumeration tableItemList, WTTableModel model, String actionName, Vector aDisplayColumns, Locale aLocale)
          Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file.
private  QueryResult queryParentByClass(Class clazz, Vector refVector)
           
(package private)  void setDisplayColumns(Vector aDisplayColumns)
           
(package private)  void setLocale(Locale aLocale)
          Set the locale for display values
 void setupTableItem(WTObject myTableItem, WTTableModel model, Vector tableFields, WfProcess process, WfActivity activity, WTObject businessObject)
          Add an entry to the model with myTableItems attributes as defined by tableFields.
private  Hashtable traverseBlocks(Vector wfblockVector, Hashtable blockByReqRef)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

ACTION_RESOURCE

private static final String ACTION_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

versionID

private static final String versionID
See Also:
Constant Field Values

TABLE_COLUMN

protected static String TABLE_COLUMN

rb

private static final ResourceBundle rb

cWFPROCESS

private static Class cWFPROCESS

cWFACTIVITY

private static Class cWFACTIVITY

cWFBLOCK

private static Class cWFBLOCK

ciWTREFERENCE

private static ClassInfo ciWTREFERENCE

ciPERSISTABLE

private static ClassInfo ciPERSISTABLE

DISABLE_LOBS

private static boolean DISABLE_LOBS

PRE_QUERY_PERSISTABLES

private static final boolean PRE_QUERY_PERSISTABLES

VERBOSE

private static final boolean VERBOSE

CHUNKSIZE

private static int CHUNKSIZE

displayColumns

private Vector displayColumns

locale

private Locale locale
Constructor Detail

TableLoaderAction

public TableLoaderAction(String name)
Method Detail

loadTableItems

public void loadTableItems(Enumeration tableItemList,
                           WTTableModel model,
                           String actionName,
                           Vector aDisplayColumns,
                           Locale aLocale)
Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file. Discovers the requested fields from entries in the wt.properties file. The objects in the tableItemList are processed as defined by the wt.properties file specification and the resulting data is placed in the model.

Parameters:
tableItemList - The items to be displayed in the table
model - The model to be populated with the data
actionName - Key for looking up the column definition string in the actions.properties file

loadTableItems

public void loadTableItems(Enumeration tableItemList,
                           WTTableModel model,
                           String actionName,
                           Locale aLocale)
Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file. Discovers the requested fields from entries in the wt.properties file. The objects in the tableItemList are processed as defined by the wt.properties file specification and the resulting data is placed in the model.

Parameters:
tableItemList - The items to be displayed in the table
model - The model to be populated with the data
actionName - Key for looking up the column definition string in the actions.properties file

loadTableItems

public void loadTableItems(Enumeration tableItemList,
                           WTTableModel model,
                           String actionName)
Loads attributes from the Objects in the tableItemList into the model in a format specified by the wt.properties file. Discovers the requested fields from entries in the wt.properties file. The objects in the tableItemList are processed as defined by the wt.properties file specification and the resulting data is placed in the model.

Parameters:
tableItemList - The items to be displayed in the table
model - The model to be populated with the data
actionName - Key for looking up the column definition string in the actions.properties file

setupTableItem

public void setupTableItem(WTObject myTableItem,
                           WTTableModel model,
                           Vector tableFields,
                           WfProcess process,
                           WfActivity activity,
                           WTObject businessObject)
Add an entry to the model with myTableItems attributes as defined by tableFields. The attributes of myTableItem formatted according to the definition supplied by tableFields. An entry is added to the model with this data.

Parameters:
myTableItem - the workItem to be processes
model - the model to update with myTableItem's attributes
tableFields - the definition of the table columns
process - the WfProcess (optional)
activity - the WfActivity (optional)
businessObject - the PrimaryBusinessObject (optional)

setDisplayColumns

void setDisplayColumns(Vector aDisplayColumns)

getDisplayColumns

Vector getDisplayColumns()
                   throws IOException
Throws:
IOException

setLocale

void setLocale(Locale aLocale)
Set the locale for display values


getLocale

Locale getLocale()
Returns:
The locale to be used for display values

getActivityMap

private Hashtable getActivityMap(Vector itemVector)
                          throws WTException
Returns:
Hashtable of WfActivities for each WorkItem in itemVector.
Throws:
WTException

getProcessMap

private Hashtable getProcessMap(Hashtable activityMap)
                         throws WTException
For all activities in the activityMap, find the corresponding WfProcess. Return a Hashtable of WfProcess by WfContainerReference (eg WfProcess or WfBlock)

Throws:
WTException

traverseBlocks

private Hashtable traverseBlocks(Vector wfblockVector,
                                 Hashtable blockByReqRef)
                          throws WTException
Throws:
WTException

queryParentByClass

private QueryResult queryParentByClass(Class clazz,
                                       Vector refVector)
                                throws WTException,
                                       QueryException
Throws:
WTException
QueryException

getPrimaryBusinessObjectMap

private Hashtable getPrimaryBusinessObjectMap(Hashtable processMap)
                                       throws WTException
Return a Hashtable containing the Process' PrimaryBusinessObjects The key is either ObjectReference or VersionForeignKey

Throws:
WTException

getPBOReference

private static WTReference getPBOReference(WfProcess wfprocess)
                                    throws WTException
Throws:
WTException