com.filenet.wcm.toolkit.server.util
Class WcmStepElementState

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.WcmStepElementState
All Implemented Interfaces:
WcmDataStoreBindingListener

public class WcmStepElementState
extends java.lang.Object
implements WcmDataStoreBindingListener

Keeps the state of EProcess Step Element information.


Constructor Summary
WcmStepElementState()
           
 
Method Summary
 void clearData()
          Cleans up step element state.
 java.lang.String getAttachmentId()
          Retrieves the current attachment id.
 java.lang.Object getAttachmentList(java.lang.String attachmentName)
          Retrieves the collection of attachment items for specified attachment name.
 java.util.Iterator getAttachments()
          Returns the iterator for the keySet in the map.
 java.util.Map getAttachmentsMap()
          Retrieves the attachments Map object.
static WcmStepElementState getGlobalInstance(WcmDpModule dp)
          Overloaded factory method that initialized step element state from global property bag.
static WcmStepElementState getGlobalInstance(WcmDpModule dp, java.lang.String key)
          Overloaded factory method that initialized step element state from global property bag.
static WcmStepElementState getInstance(WcmDpModule dp)
          Overloaded factory method that initialized step element state from module property bag
static WcmStepElementState getInstance(WcmDpModule dp, java.lang.String key)
          Overloaded factory method that initialized step element state from module property bag
static java.lang.String getKey(WcmModule module)
          return the key of this class
 org.w3c.dom.Document getStepElementXML()
          Retrieves the Step Element Document object.
 java.lang.String getSubject()
          Retrieves the current subject.
 java.lang.Object getValue(java.lang.String key)
          Retrieve a generic object from the state class.
 filenet.vw.api.VWStepElement getVWStepElement()
          Retrieves the VW Step Element object.
 java.lang.String getWorkflowVersion()
          Retrieves the current workflow version.
 java.lang.String getWorkObjectNumber()
          Retrieves the current work object number.
 void setAttachmentId(java.lang.String attachmentId)
          Sets the current attachment id.
 void setAttachmentList(java.lang.String attachmentName, java.lang.Object itemList)
          The itemList will typically be a DOM Document object holding the Attachment XML.
static void setGlobalInstance(WcmDpModule dp, WcmStepElementState state)
          Set state object into global property bag; therefore, getGlobalInstance from now on will return same state object back.
static void setGlobalInstance(WcmDpModule dp, WcmStepElementState state, java.lang.String key)
          Set state object into global property bag; therefore, getGlobalInstance from now on will return same state object back.
static void setInstance(WcmDpModule dp, WcmStepElementState state)
          Set state object into module property.
static void setKey(java.lang.String key, WcmModule module)
          Change the key of this class.
 void setStepElementXML(org.w3c.dom.Document domStepElement)
          Sets the Step Element object.
 void setSubject(java.lang.String subject)
          Sets the current subject.
 void setValue(java.lang.String key, java.lang.Object obj)
          Add a generic object to the state class.
 void setVWStepElement(filenet.vw.api.VWStepElement vwStepElement)
          Sets the VW Step Element object.
 void setWorkflowVersion(java.lang.String workflowVersion)
          Sets the current workflow version.
 void setWorkObjectNumber(java.lang.String wobNum)
          Sets the current work object number.
 void valueBound(WcmDataStore ds, java.lang.String key)
          Call back method called when the object is placed into the data store.
 void valueUnbound(WcmDataStore ds, java.lang.String key)
          Call back method called when the object is removed from the data store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WcmStepElementState

public WcmStepElementState()
Method Detail

clearData

public void clearData()
Cleans up step element state.


setVWStepElement

public void setVWStepElement(filenet.vw.api.VWStepElement vwStepElement)
Sets the VW Step Element object.

Parameters:
vwStepElement - VWStepElement object

getVWStepElement

public filenet.vw.api.VWStepElement getVWStepElement()
Retrieves the VW Step Element object.

Returns:
VWStepElement object

setStepElementXML

public void setStepElementXML(org.w3c.dom.Document domStepElement)
Sets the Step Element object.

Parameters:
domStepElement - Document object

getStepElementXML

public org.w3c.dom.Document getStepElementXML()
Retrieves the Step Element Document object.

Returns:
Document object for the Step Element

setWorkObjectNumber

public void setWorkObjectNumber(java.lang.String wobNum)
Sets the current work object number.

Parameters:
wobNum - String work object number

getWorkObjectNumber

public java.lang.String getWorkObjectNumber()
Retrieves the current work object number.

Returns:
String work object number

setWorkflowVersion

public void setWorkflowVersion(java.lang.String workflowVersion)
Sets the current workflow version.

Parameters:
workflowVersion - String workflow version.

getWorkflowVersion

public java.lang.String getWorkflowVersion()
Retrieves the current workflow version.

Returns:
String workflow version

setAttachmentId

public void setAttachmentId(java.lang.String attachmentId)
Sets the current attachment id.

Parameters:
attachmentId - String attachment id

getAttachmentId

public java.lang.String getAttachmentId()
Retrieves the current attachment id.

Returns:
String attachment id

setSubject

public void setSubject(java.lang.String subject)
Sets the current subject.

Parameters:
subject - String subject

getSubject

public java.lang.String getSubject()
Retrieves the current subject.

Returns:
String subject

getAttachmentList

public java.lang.Object getAttachmentList(java.lang.String attachmentName)
                                   throws java.lang.Exception
Retrieves the collection of attachment items for specified attachment name.

Parameters:
attachmentName - Key used to map object information.
Returns:
Object list of attachment items.
Throws:
java.lang.Exception

getAttachments

public java.util.Iterator getAttachments()
                                  throws java.lang.Exception
Returns the iterator for the keySet in the map. Can be used to loop through the keys of the map.

Returns:
iterator Iterator for the keySet.
Throws:
java.lang.Exception

getAttachmentsMap

public java.util.Map getAttachmentsMap()
                                throws java.lang.Exception
Retrieves the attachments Map object.

Returns:
Map list of attachments.
Throws:
java.lang.Exception

setAttachmentList

public void setAttachmentList(java.lang.String attachmentName,
                              java.lang.Object itemList)
                       throws java.lang.Exception
The itemList will typically be a DOM Document object holding the Attachment XML.

Parameters:
attachmentName - Key used to map object information.
itemList - Object list to store in Map under key.
Throws:
java.lang.Exception

getInstance

public static WcmStepElementState getInstance(WcmDpModule dp)
                                       throws java.lang.Exception
Overloaded factory method that initialized step element state from module property bag

Parameters:
dp - EProcessDataProvider which cached state information in its data store.
Returns:
WcmStepElementState, returns itself back.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

getInstance

public static WcmStepElementState getInstance(WcmDpModule dp,
                                              java.lang.String key)
                                       throws java.lang.Exception
Overloaded factory method that initialized step element state from module property bag

Parameters:
dp - EProcessDataProvider which cached state information in its data store.
key - Allow different states coexist.
Returns:
WcmStepElementState, returns itself back.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

setInstance

public static void setInstance(WcmDpModule dp,
                               WcmStepElementState state)
                        throws java.lang.Exception
Set state object into module property.

Parameters:
dp - Data Provider which cached state information in its data store.
state - WcmStepElementState that has state information.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

getGlobalInstance

public static WcmStepElementState getGlobalInstance(WcmDpModule dp)
                                             throws java.lang.Exception
Overloaded factory method that initialized step element state from global property bag.

Parameters:
dp - Data Provider which cached state information in its data store.
Returns:
WcmStepElementState, returns itself back.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

getGlobalInstance

public static WcmStepElementState getGlobalInstance(WcmDpModule dp,
                                                    java.lang.String key)
                                             throws java.lang.Exception
Overloaded factory method that initialized step element state from global property bag.

Parameters:
dp - Data Provider which cached state information in its data store.
key - Allow different states coexist.
Returns:
WcmStepElementState, returns itself back.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

setGlobalInstance

public static void setGlobalInstance(WcmDpModule dp,
                                     WcmStepElementState state)
                              throws java.lang.Exception
Set state object into global property bag; therefore, getGlobalInstance from now on will return same state object back. This is used between a local state and global state conversion.

Parameters:
dp - A Data Provider which cached state information in its data store.
state - WcmStepElementState that has state information from module property.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

setGlobalInstance

public static void setGlobalInstance(WcmDpModule dp,
                                     WcmStepElementState state,
                                     java.lang.String key)
                              throws java.lang.Exception
Set state object into global property bag; therefore, getGlobalInstance from now on will return same state object back. This is used between a local state and global state conversion.

Parameters:
dp - Data Provider which cached state information in its data store.
state - WcmStepElementState that has state information from module property.
key - Allow different states coexist.
Throws:
java.lang.Exception - If there are problems retrieving data or an invalid parameter.

setKey

public static void setKey(java.lang.String key,
                          WcmModule module)
                   throws java.lang.Exception
Change the key of this class. This can be used to allow multiple instances of this class but with different key.

Parameters:
key - - String
module -
Throws:
java.lang.Exception

getKey

public static java.lang.String getKey(WcmModule module)
                               throws java.lang.Exception
return the key of this class

Parameters:
module -
Returns:
- String, key of this class
Throws:
java.lang.Exception

setValue

public void setValue(java.lang.String key,
                     java.lang.Object obj)
Add a generic object to the state class. The object can be referenced by using the specified "key".

Parameters:
key - - String identifier for the object
obj - - Object to add

getValue

public java.lang.Object getValue(java.lang.String key)
Retrieve a generic object from the state class. The object can be referenced by using the specified "key".

Parameters:
key - String identifier for the object
Returns:
Object

valueBound

public void valueBound(WcmDataStore ds,
                       java.lang.String key)
Call back method called when the object is placed into the data store.

Specified by:
valueBound in interface WcmDataStoreBindingListener
Parameters:
ds - WcmDataStore object
key - String key for data store

valueUnbound

public void valueUnbound(WcmDataStore ds,
                         java.lang.String key)
Call back method called when the object is removed from the data store. This happens when the data store is destructed on SignOut or the Java™Server Pages (JSP) session times out.

Specified by:
valueUnbound in interface WcmDataStoreBindingListener
Parameters:
ds - WcmDataStore object
key - String key for data store


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.