wt.epm
Class EPMCADNameHelper

java.lang.Object
  extended bywt.epm.EPMCADNameHelper

class EPMCADNameHelper
extends Object

The EPMCADNameHelper class provides set of static methods related to CADNameOperations.

Supported API: false

Extendable: false


Field Summary
private static String EPMRESOURCE
           
 
Constructor Summary
(package private) EPMCADNameHelper()
           
 
Method Summary
protected static WTSet changeCADName(WTKeyedMap masters)
          Changes CAD name on the given masters.
private static void checkCADName(WTKeyedMap masters)
          Given a map of EPMDocumentMaster objects and their new CAD names, throws a multi-object exception if the new CAD name is null or does not meet the authoring application specific CAD name rules.
private static List checkCheckoutState(WTCollection masters, boolean throwException)
          Finds all the checked out iterations of the given masters.
private static QueryResult checkIfUsedInFTCellDep(WTKeyedMap masters, HashMap Old2NewNamesMap)
           
private static void checkVersionPermission(WTSet masters)
          Checks the given permission for all versions of the given masters.
protected static Vector collectChangeCADNameVetos(EPMDocumentMaster master)
          Collects all exceptions if the CAD name of the given master is changed.
private static void dispatchPostChangeCADNameEvent(WTSet eventTarget)
          Dispatches a POST_CHANGE_CAD_NAME event
private static void dispatchPreChangeCADNameEvent(WTKeyedMap eventTarget)
          Dispatches a PRE_CHANGE_CAD_NAME event
private static Vector filterExceptions(Vector eVector)
           
private static WTSet findCheckedOutIterations(WTCollection masters)
          Gets the checked out iterations for the given masters.
private static String getCheckedOutBy(EPMDocument epmDoc)
           
private static WTKeyedMap getFamilyTableMasters(WTCollection masters)
           
private static WTSet setCADName(WTKeyedMap masters)
          Calls EPMDocumentMaster.updateCADName for the given map of masters and their new CAD names.
private static void setChildName(QueryResult qr, HashMap old2NewNames)
           
private static WTSet setFamilyTableMasters(WTKeyedMap masters)
          Given a list of family table masters indexed by the related document masters and a list of new names indexed by document masters, sets the family table masters to the corresponding new 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

EPMCADNameHelper

EPMCADNameHelper()
Method Detail

changeCADName

protected static WTSet changeCADName(WTKeyedMap masters)
                              throws WTException
Changes CAD name on the given masters.

Parameters:
masters - a map of EPMDocumentMaster objects and their new CAD names.
Returns:
WTSet a set of updated EPMDocumentMaster objects
Throws:
WTException

checkIfUsedInFTCellDep

private static QueryResult checkIfUsedInFTCellDep(WTKeyedMap masters,
                                                  HashMap Old2NewNamesMap)
                                           throws WTException
Throws:
WTException

checkCADName

private static void checkCADName(WTKeyedMap masters)
                          throws WTException
Given a map of EPMDocumentMaster objects and their new CAD names, throws a multi-object exception if the new CAD name is null or does not meet the authoring application specific CAD name rules.

Parameters:
masters - a map of EPMDocumentMaster objects and their new CAD names.
Throws:
WTException

checkVersionPermission

private static void checkVersionPermission(WTSet masters)
                                    throws WTException
Checks the given permission for all versions of the given masters. This method either throws a multi-object exception or returns a list of exceptions.

Parameters:
masters - a list of masters to check.
Returns:
List list of exceptions if applicable
Throws:
WTException

checkCheckoutState

private static List checkCheckoutState(WTCollection masters,
                                       boolean throwException)
                                throws WTException
Finds all the checked out iterations of the given masters. Throws exceptions if the iterations are checked out by another user.

Parameters:
masters - list of EPMDocumentMaster objects.
throwException - a flag indicating whether the list of exceptions found should be thrown or simply returned. Returning the exception is for supporting EPMDocumentManager.collectChangeCADNameVetos.
Returns:
List list of exceptions if applicable
Throws:
WTException

collectChangeCADNameVetos

protected static Vector collectChangeCADNameVetos(EPMDocumentMaster master)
                                           throws WTException
Collects all exceptions if the CAD name of the given master is changed. This feature is deprecated in x05.

Throws:
WTException

filterExceptions

private static Vector filterExceptions(Vector eVector)

getCheckedOutBy

private static String getCheckedOutBy(EPMDocument epmDoc)
                               throws WTException
Throws:
WTException

dispatchPreChangeCADNameEvent

private static void dispatchPreChangeCADNameEvent(WTKeyedMap eventTarget)
                                           throws WTException
Dispatches a PRE_CHANGE_CAD_NAME event

Throws:
WTException

dispatchPostChangeCADNameEvent

private static void dispatchPostChangeCADNameEvent(WTSet eventTarget)
                                            throws WTException
Dispatches a POST_CHANGE_CAD_NAME event

Throws:
WTException

setCADName

private static WTSet setCADName(WTKeyedMap masters)
                         throws WTException
Calls EPMDocumentMaster.updateCADName for the given map of masters and their new CAD names.

Parameters:
masters - a map of EPMDocumentMaster objects and their new CAD names.
Throws:
WTException

setChildName

private static void setChildName(QueryResult qr,
                                 HashMap old2NewNames)
                          throws WTException
Throws:
WTException

findCheckedOutIterations

private static WTSet findCheckedOutIterations(WTCollection masters)
                                       throws WTException
Gets the checked out iterations for the given masters.

Parameters:
masters - a list of masters
Returns:
WTSet A list of iterations of the given masters that are checked out
Throws:
WTException

setFamilyTableMasters

private static WTSet setFamilyTableMasters(WTKeyedMap masters)
                                    throws WTException
Given a list of family table masters indexed by the related document masters and a list of new names indexed by document masters, sets the family table masters to the corresponding new names.

Parameters:
masters - a WTKeyedMap whose keys are document masters and whose values are the new names.
Throws:
WTException

getFamilyTableMasters

private static WTKeyedMap getFamilyTableMasters(WTCollection masters)
                                         throws WTException
Throws:
WTException