com.ptc.windchill.uwgm.proesrv.rrc
Class WsOriginalStateHelper

java.lang.Object
  extended bycom.ptc.windchill.uwgm.proesrv.rrc.WsOriginalStateHelper

final class WsOriginalStateHelper
extends Object

Package-private RRC helper class to process Workspace original state


Nested Class Summary
(package private) static class WsOriginalStateHelper.WSInfo
           
 
Field Summary
private  RequestResultCache cache
           
(package private) static Integer INTEGER_MINUS_1
           
private  Set iterationsToIgnore
           
private  Set iterationsToKeep
           
private static Log log
           
private  Map wsMap
           
 
Constructor Summary
(package private) WsOriginalStateHelper(RequestResultCache cache)
           
 
Method Summary
(package private)  WsOriginalStateHelper.WSInfo getWSInfo(EPMWorkspace epmWS)
           
(package private)  boolean ignoreIteration(com.ptc.windchill.uwgm.soap.uwgmdb.Iteration it)
           
(package private)  void ignoreOriginalState(Workable iter)
          Always retrive all requested attributes for a given iteration regardless of its original state (update counter changes).
(package private)  void ignoreWorkspaceOriginalState(EPMWorkspace epmWS)
          Marks the WS to always retrieve all requested attributes regardless of the original state.
(package private)  void processWorkspaceChanges(Map epmIterAttrs, Map partIterAttrs)
          Gather all "not changed" iterations from all workspaces to the iterationsToIgnore collection.
private  void processWorkspaceChanges(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws, WsOriginalStateHelper.WSInfo wsInfo)
           
private  int removeIgnored(Map attrMap)
           
private  void retrieveWorkspaceOriginalState(EPMWorkspace epmWS, WsOriginalStateHelper.WSInfo wsInfo)
           
(package private)  void setWorkspaceOriginalState(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request, EPMWorkspace epmWS)
          For a request which returns WorkspaceMessage, retrieve and remember the original state of the WS in order to optimize post-processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final Log log

cache

private final RequestResultCache cache

wsMap

private final Map wsMap

iterationsToIgnore

private final Set iterationsToIgnore

iterationsToKeep

private final Set iterationsToKeep

INTEGER_MINUS_1

static final Integer INTEGER_MINUS_1
Constructor Detail

WsOriginalStateHelper

WsOriginalStateHelper(RequestResultCache cache)
Method Detail

setWorkspaceOriginalState

void setWorkspaceOriginalState(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request,
                               EPMWorkspace epmWS)
For a request which returns WorkspaceMessage, retrieve and remember the original state of the WS in order to optimize post-processing. For all iterations which have remained unchanged by the end of the transaction most of requested attributes will be ignored, except for the DbObjId and update counter (StateId).

Parameters:
request - UwgmRequest
epmWS - EPMWorkspace

ignoreWorkspaceOriginalState

void ignoreWorkspaceOriginalState(EPMWorkspace epmWS)
Marks the WS to always retrieve all requested attributes regardless of the original state. Prevents the optimization prescribed by the setWorkspaceOriginalState() call.

Parameters:
epmWS - EPMWorkspace

ignoreOriginalState

void ignoreOriginalState(Workable iter)
Always retrive all requested attributes for a given iteration regardless of its original state (update counter changes).

Parameters:
iter - Workable iteration

getWSInfo

WsOriginalStateHelper.WSInfo getWSInfo(EPMWorkspace epmWS)

retrieveWorkspaceOriginalState

private void retrieveWorkspaceOriginalState(EPMWorkspace epmWS,
                                            WsOriginalStateHelper.WSInfo wsInfo)
                                     throws WTException
Throws:
WTException

ignoreIteration

boolean ignoreIteration(com.ptc.windchill.uwgm.soap.uwgmdb.Iteration it)

processWorkspaceChanges

void processWorkspaceChanges(Map epmIterAttrs,
                             Map partIterAttrs)
Gather all "not changed" iterations from all workspaces to the iterationsToIgnore collection.


removeIgnored

private int removeIgnored(Map attrMap)

processWorkspaceChanges

private void processWorkspaceChanges(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws,
                                     WsOriginalStateHelper.WSInfo wsInfo)