com.ptc.windchill.uwgm.common.pdm
Class PDMStateContainerHelper

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.pdm.PDMStateContainerHelper
Direct Known Subclasses:
PDMStateFolderHelper, PDMStateWorkspaceHelper

public class PDMStateContainerHelper
extends Object

Define SimplePDMState for a collection of Workable objects from container. All information is retrieved from DB upon first call of a query method. In case of an exception upon a retrieval, first called method throws it, but all subsequent calls of this methods will just return empty values.


Field Summary
protected static Log log
           
protected  WTSet newObjs
           
protected  WTKeyedMap targetFolders
           
protected  WTCollection workables
           
 
Constructor Summary
PDMStateContainerHelper(WTCollection workables)
          Construct helper for a given set of PDM documents.
 
Method Summary
protected  WTSet getNew()
          Retrieve new objects from a collection of Workables.
 SimplePdmState getPDMState(Workable obj)
          Returns the simple PDM state of a workable object
 Folder getTargetFolder(Workable obj)
          Returns target folder for a new object.
protected  WTKeyedMap getTargetFolders()
          Returns target folders for a set of Workable objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workables

protected WTCollection workables

newObjs

protected WTSet newObjs

targetFolders

protected WTKeyedMap targetFolders

log

protected static Log log
Constructor Detail

PDMStateContainerHelper

public PDMStateContainerHelper(WTCollection workables)
Construct helper for a given set of PDM documents.

Parameters:
workables - WTCollection
Throws:
IllegalArgumentException - if any of the parameters is invalid
Method Detail

getPDMState

public SimplePdmState getPDMState(Workable obj)
                           throws WTException
Returns the simple PDM state of a workable object

Parameters:
obj - Workable
Returns:
SimplePdmState
Throws:
WTException

getTargetFolder

public Folder getTargetFolder(Workable obj)
                       throws WTException
Returns target folder for a new object.

Parameters:
obj - Workable
Returns:
Folder or null if an obj is not new or target folder was not set.
Throws:
WTException

getNew

protected WTSet getNew()
                throws WTException
Retrieve new objects from a collection of Workables.

Returns:
WTSet of new objects
Throws:
WTException

getTargetFolders

protected WTKeyedMap getTargetFolders()
                               throws WTException
Returns target folders for a set of Workable objects.

Returns:
WTKeyedMap [Workable -> Folder]
Throws:
WTException
See Also:
EPMWorkspaceManager.getTargetLocation()