wt.epm
Class CADNamespaceManager

java.lang.Object
  extended bywt.epm.CADNamespaceManager

public class CADNamespaceManager
extends Object

CADNamespaceManager is a class that handles all related functions for EPMCADNamespace class.

Supported API: false

Extendable: false


Field Summary
private static String EPMRESOURCE
           
 
Constructor Summary
CADNamespaceManager()
           
 
Method Summary
protected static void add(WTCollection masters)
          Creates EPMCADNamespace for the given masters.
private static void addToNamespace(WTCollection documents, WTCollection masters, WTContainer sandbox)
          Adds entries for masters to CAD Name space of the Sandbox
protected static void clean(Collection sharedContainerMaps)
          Cleans CADNamespace
private static WTCollection createCADNamespaces(WTCollection masters)
           
private static void deleteCADNamespaces(WTCollection excludeMasters, WTContainerRef containerRef)
           
private static WTCollection findDuplicates(WTCollection namespaces)
           
private static String formatNamespaceError(WTCollection nonUniqueNamespaces, Map mastersById)
           
private static List getCADName(WTCollection namespaces)
           
private static WTSet getCADNamespaces(WTCollection masters)
           
private static WTSet getCADNamespaces(WTCollection excludeMasters, ObjectReference containerRef)
           
private static WTSet getDependentMasters(WTCollection objects, boolean checkAuthoringApp)
           
private static QueryResult getEPMDocumentsInSandbox(WTContainerRef sandboxRef)
          Returns all the EPMDocuments in given container, which includes locally created and sandbox checkout.
private static WTCollection getMasters(WTCollection masters, WTContainer sandbox)
           
protected static void processPreMultiSBCheckinEvent(WTKeyedMap initialCheckinWorkingCopyToDataMap)
           
private static WTCollection saveCADNamespaces(WTCollection namespaces)
           
protected static void update(WTCollection docs, WTContainer sandbox)
           
protected static void update(WTKeyedMap masters)
          Given a map of EPMDocumentMaster objects and their new CADName, updates EPMCADNamespace with new CAD names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values
Constructor Detail

CADNamespaceManager

public CADNamespaceManager()
Method Detail

add

protected static void add(WTCollection masters)
                   throws WTException
Creates EPMCADNamespace for the given masters.

Parameters:
masters - a list of EPMDocumentMaster objects.
Throws:
WTException

processPreMultiSBCheckinEvent

protected static void processPreMultiSBCheckinEvent(WTKeyedMap initialCheckinWorkingCopyToDataMap)
                                             throws WTException
Throws:
WTException

update

protected static void update(WTKeyedMap masters)
                      throws WTException
Given a map of EPMDocumentMaster objects and their new CADName, updates EPMCADNamespace with new CAD names. If the new CAD name is not unique in the master's container, an exception is thrown. When objects are checked in to PDM with a new CAD name the first time, the namespace is taken care on PRE_MULTI_SB_CHECKIN. It's safe to ignore the CHANGE_CAD_NAME event here. Please see processPreMultiSBCheckinEvent for details.

Throws:
WTException

update

protected static void update(WTCollection docs,
                             WTContainer sandbox)
                      throws WTException
Throws:
WTException

getDependentMasters

private static WTSet getDependentMasters(WTCollection objects,
                                         boolean checkAuthoringApp)
                                  throws WTException
Throws:
WTException

getMasters

private static WTCollection getMasters(WTCollection masters,
                                       WTContainer sandbox)
                                throws WTException
Throws:
WTException

addToNamespace

private static void addToNamespace(WTCollection documents,
                                   WTCollection masters,
                                   WTContainer sandbox)
                            throws WTException
Adds entries for masters to CAD Name space of the Sandbox

Parameters:
documents - List of documents that are getting checkedout or shared to Sandbox. The list is only used for giving better error messages.
masters - List of EPMDocumentMaster objects that are dependents, instances or generic of the documents.
sandbox - The container
Throws:
WTException - exception if CAD Name already exists in Sandbox Container

clean

protected static void clean(Collection sharedContainerMaps)
                     throws WTException,
                            WTPropertyVetoException
Cleans CADNamespace

Parameters:
sharedContainerMaps - collection of SharedContainerMap
Throws:
WTException
WTPropertyVetoException

getEPMDocumentsInSandbox

private static QueryResult getEPMDocumentsInSandbox(WTContainerRef sandboxRef)
                                             throws WTException
Returns all the EPMDocuments in given container, which includes locally created and sandbox checkout.

Parameters:
sandboxRef - container ref
Throws:
WTException

createCADNamespaces

private static WTCollection createCADNamespaces(WTCollection masters)
                                         throws WTException
Throws:
WTException

saveCADNamespaces

private static WTCollection saveCADNamespaces(WTCollection namespaces)
                                       throws WTException
Throws:
WTException

findDuplicates

private static WTCollection findDuplicates(WTCollection namespaces)
                                    throws WTException
Throws:
WTException

formatNamespaceError

private static String formatNamespaceError(WTCollection nonUniqueNamespaces,
                                           Map mastersById)
                                    throws WTException
Throws:
WTException

getCADNamespaces

private static WTSet getCADNamespaces(WTCollection masters)
                               throws WTException
Throws:
WTException

getCADNamespaces

private static WTSet getCADNamespaces(WTCollection excludeMasters,
                                      ObjectReference containerRef)
                               throws WTException
Throws:
WTException

deleteCADNamespaces

private static void deleteCADNamespaces(WTCollection excludeMasters,
                                        WTContainerRef containerRef)
                                 throws WTException
Throws:
WTException

getCADName

private static List getCADName(WTCollection namespaces)
                        throws WTException
Throws:
WTException