com.ptc.windchill.uwgm.proesrv.action
Class UndoCheckoutAction

java.lang.Object
  extended bycom.ptc.windchill.uwgm.proesrv.action.UwgmAction
      extended bycom.ptc.windchill.uwgm.proesrv.action.UwgmWorkspaceAction
          extended bycom.ptc.windchill.uwgm.proesrv.action.UwgmWorkspaceObjectsAction
              extended bycom.ptc.windchill.uwgm.proesrv.action.DeleteNewObjectsAction
                  extended bycom.ptc.windchill.uwgm.proesrv.action.UndoCheckoutAction
Direct Known Subclasses:
RemoveFromWorkspaceAction

public class UndoCheckoutAction
extends DeleteNewObjectsAction

Implements the Undo Checkout action over a collection of objects in a workspace. Note that the current implementation of executeAction() will have to be changed to make use of the new EPMWorkspaceManager


Field Summary
private static Log log
           
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.action.DeleteNewObjectsAction
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.action.UwgmWorkspaceObjectsAction
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.action.UwgmWorkspaceAction
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.action.UwgmAction
 
Constructor Summary
UndoCheckoutAction(RequestContext requestContext, EPMWorkspace workspace)
           
 
Method Summary
protected  WTSet callEpmUndoCheckout(EPMWorkspace workspace, WTCollection workingCopies)
          Performs actual undo checkout operation.
 void executeAction()
          Implementation of method from ProeServiceAction interface.
private  void printPdmState(WTCollection actionObjects, EPMWorkspace ws)
           
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.action.DeleteNewObjectsAction
getCheckedInObjects, getCheckedOutObjects, getNewObjects, setActionObjects, setNewObjects
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.action.UwgmWorkspaceObjectsAction
getActionObjects, getEPMWorkspace, getResultObjects, setEPMWorkspace, setResultObjects
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.action.UwgmAction
addWarning, checkExecutionSuccess, execute, getContext, getWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static Log log
Constructor Detail

UndoCheckoutAction

public UndoCheckoutAction(RequestContext requestContext,
                          EPMWorkspace workspace)
Method Detail

executeAction

public void executeAction()
                   throws UwgmConflictException,
                          UwgmErrorException
Implementation of method from ProeServiceAction interface. Currently this code does a cancel-checkout of objects and updation of workspace manually using old EPM APIs. But later on the code needs to be replaced by EPMWorkspaceManager interface calls.

Overrides:
executeAction in class DeleteNewObjectsAction
Returns:
void
Throws:
ConflictException, - WTException, WTPropertyVetoException
UwgmConflictException
UwgmErrorException

callEpmUndoCheckout

protected WTSet callEpmUndoCheckout(EPMWorkspace workspace,
                                    WTCollection workingCopies)
                             throws WTException
Performs actual undo checkout operation. Allows subclasses, like remove from WS, to override this method to avoid restoring these iterations in the WS.

Parameters:
workspace - EPMWorkspace
workingCopies - A collection of objects to undo checkout.
Returns:
WTSet of objects returned by EPM API
Throws:
WTException - from EPM API

printPdmState

private void printPdmState(WTCollection actionObjects,
                           EPMWorkspace ws)
                    throws WTException
Throws:
WTException