wt.epm.familytable
Class EPMSandboxUndoCheckoutDataContainer

java.lang.Object
  extended bywt.epm.familytable.EPMNewIterationDataContainer
      extended bywt.epm.familytable.EPMSandboxUndoCheckoutDataContainer

public class EPMSandboxUndoCheckoutDataContainer
extends EPMNewIterationDataContainer


Nested Class Summary
 class EPMSandboxUndoCheckoutDataContainer.icSandboxUndoCheckoutOperationAdapter
           
 
Nested classes inherited from class wt.epm.familytable.EPMNewIterationDataContainer
EPMNewIterationDataContainer.icCheckoutOperationAdapter, EPMNewIterationDataContainer.icDefaultOperationAdapter, EPMNewIterationDataContainer.icOperationAdapter, EPMNewIterationDataContainer.icSandboxCheckinOperationAdapter, EPMNewIterationDataContainer.icSandboxCheckoutOperationAdapter
 
Field Summary
(package private)  WTValuedHashMap m_copyContainedInLinks
           
(package private)  Collection m_familyTablesIdsToDie
           
(package private)  WTCollection m_otherDocsFromSameFTsToBeRemovedFromSB
           
static int MODE_SANDBOX_UNDO_CHECKOUT
           
 
Fields inherited from class wt.epm.familytable.EPMNewIterationDataContainer
m_allDocs, m_familyTables, m_familyTablesNotToCopy, m_latestNonLatestMap, m_originalIdToTargetDoc, m_originalIdToTargetFT, m_originalWithoutTargetDocIds, m_orphanDocIds, MODE_CHECKOUT, MODE_SANDBOX_CHECKIN, MODE_SANDBOX_CHECKOUT, MODE_UNKNOWN
 
Constructor Summary
EPMSandboxUndoCheckoutDataContainer(WTContainerRef containerRef, WTValuedMap workingToOriginalMap, Collection initFamilyTables)
           
 
Method Summary
 void copyFamilyTables()
           
private  WTCollection getOtherDocumentsFromSameFamilyTablesToBeRemovedFromSB(WTCollection initDocs)
          This method is a hack, hopefully temporary hack.
private  void initSandboxUndoCheckoutCollections(WTCollection originals)
           
 boolean isNeedToCopyFamilyTables()
           
 boolean isReadyToCopyFamilyTables()
           
private  void makeStandaloneNewInSBOtherDocsFromSameFT()
           
private  Collection queryFamilyTableIdsToDie()
          This method queries ft that must be removed because they will not have members in sb after operation
 void rollbackFamilyTables()
           
 void setMode(int mode)
           
 
Methods inherited from class wt.epm.familytable.EPMNewIterationDataContainer
addDocument, addDocuments, copyFamilyTablesWithVariantLinks, copyOrphanedVariantLinks, getConflicts, getContainerRef, getDocs, getFamilyTables, getMode, getOperationAdapter, getOriginalIdToTargetFTMap, getOriginalObjectIdConsideringNonlatests, getWorkspace, isFamilyTableConflicts, isNeedToCopyFamilyTablesOrVariantLinks, moveFTLinks, registerMoreFamilyTables, registerMoreFamilyTables, setOperationAdapter, setTargetDocument, setWorkspace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_SANDBOX_UNDO_CHECKOUT

public static final int MODE_SANDBOX_UNDO_CHECKOUT
See Also:
Constant Field Values

m_familyTablesIdsToDie

Collection m_familyTablesIdsToDie

m_otherDocsFromSameFTsToBeRemovedFromSB

WTCollection m_otherDocsFromSameFTsToBeRemovedFromSB

m_copyContainedInLinks

WTValuedHashMap m_copyContainedInLinks
Constructor Detail

EPMSandboxUndoCheckoutDataContainer

public EPMSandboxUndoCheckoutDataContainer(WTContainerRef containerRef,
                                           WTValuedMap workingToOriginalMap,
                                           Collection initFamilyTables)
                                    throws WTException
Method Detail

initSandboxUndoCheckoutCollections

private void initSandboxUndoCheckoutCollections(WTCollection originals)
                                         throws WTException
Throws:
WTException

getOtherDocumentsFromSameFamilyTablesToBeRemovedFromSB

private WTCollection getOtherDocumentsFromSameFamilyTablesToBeRemovedFromSB(WTCollection initDocs)
                                                                     throws WTException
This method is a hack, hopefully temporary hack. When SandboxService.removeObjects is call it deals with different kinds of objects. Some of them were checked out to project, others were just shared there, and the others were created in project. To do undoCheckout correctly we must have complete set of objects. The best solution probably would be if SandboxService have thrown special event "removeFromSandbox", but instead it just puts everything into transaction context. The purpose of this method to filter out shares and collect all other docs to be removed from SB

Parameters:
initDocs - WTCollection
Returns:
WTCollection
Throws:
WTException

makeStandaloneNewInSBOtherDocsFromSameFT

private void makeStandaloneNewInSBOtherDocsFromSameFT()
                                               throws WTException
Throws:
WTException

queryFamilyTableIdsToDie

private Collection queryFamilyTableIdsToDie()
                                     throws WTException
This method queries ft that must be removed because they will not have members in sb after operation

Returns:
Collection
Throws:
WTException

rollbackFamilyTables

public void rollbackFamilyTables()
                          throws WTException
Throws:
WTException

isReadyToCopyFamilyTables

public boolean isReadyToCopyFamilyTables()
Overrides:
isReadyToCopyFamilyTables in class EPMNewIterationDataContainer

isNeedToCopyFamilyTables

public boolean isNeedToCopyFamilyTables()
                                 throws WTException
Throws:
WTException

copyFamilyTables

public void copyFamilyTables()
                      throws WTException
Throws:
WTException

setMode

public void setMode(int mode)
             throws WTException
Overrides:
setMode in class EPMNewIterationDataContainer
Throws:
WTException