com.ptc.windchill.uwgm.common.autoassociate
Class AutoAssociateHelper

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.autoassociate.AutoAssociateHelper

public class AutoAssociateHelper
extends Object


Field Summary
private static String autoAssocNamingParameter
           
private static String autoAssocNumberParameter
           
private static String CLASSNAME
           
private static String custClass
           
private static String dropNameExtension
           
private static String dropNumberExtension
           
private static Log log
           
private static ReferenceFactory refFactory
           
private static String RESOURCE
           
private static Class[] RETREIVER_SEED_CLASSES
           
 
Constructor Summary
AutoAssociateHelper()
           
 
Method Summary
static HashMap associateDocsWithNewOrExistingParts(EPMDocument[] docs, EPMWorkspace workspace)
           
static WTValuedMap associateDocsWithNewOrExistingParts(EPMWorkspace workspace, WTCollection epmDocuments)
           
static WTObject checkoutObjectToAssociate(WTObject objectToCheckout, EPMWorkspace workspace, boolean isActiveWorkspace, boolean checkForIsNewPart)
           
static BinaryLink createAssociation(EPMDocument document, WTPart partToAssociate, String assocType, boolean disassociateExisting)
           
static WTPart createAutoAssociatePart(EPMDocument doc, String aPartNumber, String aPartName, String folderOID, PartType aPartType, EPMWorkspace ws, Source a_source, QuantityUnit a_defaultUnits)
           
static WTPart createAutoAssociatePart(EPMWorkspace ws, EPMDocument doc)
           
private static WTPart createNewPartIfPossible(AutoAssociatePartFinderCreator adag, EPMDocument document, String aPartNumber, String aPartName, PartType aPartType, EPMWorkspace ws, Source a_source, QuantityUnit a_defaultUnits, String folderOID)
           
static Vector createOrFetchPartsAndAssociate(EPMDocument[] docs, EPMWorkspace workspace)
           
static ResultGraph getAssociatedResultGraph(WTCollection seeds, boolean includePassive)
           
static AutoAssociatePartFinderCreator getAutoAssociatePartFinderCreator()
           
static Object[] getFilteredReferedDoc(EPMDocument drawingDoc, EPMWorkspace workspace)
           
static String getNewPartName(EPMWorkspace ws, EPMDocument doc)
           
static String getNewPartNumber(EPMWorkspace ws, EPMDocument doc)
           
static String getOID(Persistable obj)
           
private static ReferenceFactory getReferenceFactory()
           
private static AutoAssociatePartFinderCreator instantiateProxy(String proxyClassName)
           
private static boolean isAutoNumberingOn(WTContainer container, Class objectClass)
           
static WTPart modifyPartToAssocVersionIdentifier(WTPart part, EPMDocument document, WTContainer container)
           
private static void removeExistingAssociation(EPMDocument document, WTPart part)
           
static void saveNewlyCreatedParts(WTArrayList createdParts, EPMWorkspace workspace, WTKeyedMap partTargetFolders)
           
private static Versioned setWTPartVersionIdentifier(WTPart part, EPMDocument doc)
           
private static boolean shouldDropNameExtension()
           
private static boolean shouldDropNumberExtension()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

custClass

private static String custClass

refFactory

private static ReferenceFactory refFactory

RETREIVER_SEED_CLASSES

private static final Class[] RETREIVER_SEED_CLASSES

autoAssocNumberParameter

private static String autoAssocNumberParameter

autoAssocNamingParameter

private static String autoAssocNamingParameter

dropNameExtension

private static String dropNameExtension

dropNumberExtension

private static String dropNumberExtension

log

private static final Log log
Constructor Detail

AutoAssociateHelper

public AutoAssociateHelper()
Method Detail

createAutoAssociatePart

public static WTPart createAutoAssociatePart(EPMDocument doc,
                                             String aPartNumber,
                                             String aPartName,
                                             String folderOID,
                                             PartType aPartType,
                                             EPMWorkspace ws,
                                             Source a_source,
                                             QuantityUnit a_defaultUnits)

getAutoAssociatePartFinderCreator

public static AutoAssociatePartFinderCreator getAutoAssociatePartFinderCreator()

instantiateProxy

private static AutoAssociatePartFinderCreator instantiateProxy(String proxyClassName)

createNewPartIfPossible

private static WTPart createNewPartIfPossible(AutoAssociatePartFinderCreator adag,
                                              EPMDocument document,
                                              String aPartNumber,
                                              String aPartName,
                                              PartType aPartType,
                                              EPMWorkspace ws,
                                              Source a_source,
                                              QuantityUnit a_defaultUnits,
                                              String folderOID)

createAutoAssociatePart

public static WTPart createAutoAssociatePart(EPMWorkspace ws,
                                             EPMDocument doc)

shouldDropNumberExtension

private static boolean shouldDropNumberExtension()

shouldDropNameExtension

private static boolean shouldDropNameExtension()

isAutoNumberingOn

private static boolean isAutoNumberingOn(WTContainer container,
                                         Class objectClass)
                                  throws WTException
Throws:
WTException

getNewPartNumber

public static String getNewPartNumber(EPMWorkspace ws,
                                      EPMDocument doc)

getNewPartName

public static String getNewPartName(EPMWorkspace ws,
                                    EPMDocument doc)

createOrFetchPartsAndAssociate

public static Vector createOrFetchPartsAndAssociate(EPMDocument[] docs,
                                                    EPMWorkspace workspace)
                                             throws WTException
Throws:
WTException

associateDocsWithNewOrExistingParts

public static WTValuedMap associateDocsWithNewOrExistingParts(EPMWorkspace workspace,
                                                              WTCollection epmDocuments)
                                                       throws WTException
Throws:
WTException

associateDocsWithNewOrExistingParts

public static HashMap associateDocsWithNewOrExistingParts(EPMDocument[] docs,
                                                          EPMWorkspace workspace)
                                                   throws WTException
Throws:
WTException

getOID

public static String getOID(Persistable obj)

getReferenceFactory

private static ReferenceFactory getReferenceFactory()

getFilteredReferedDoc

public static Object[] getFilteredReferedDoc(EPMDocument drawingDoc,
                                             EPMWorkspace workspace)

saveNewlyCreatedParts

public static void saveNewlyCreatedParts(WTArrayList createdParts,
                                         EPMWorkspace workspace,
                                         WTKeyedMap partTargetFolders)
                                  throws WTException
Throws:
WTException

checkoutObjectToAssociate

public static WTObject checkoutObjectToAssociate(WTObject objectToCheckout,
                                                 EPMWorkspace workspace,
                                                 boolean isActiveWorkspace,
                                                 boolean checkForIsNewPart)
                                          throws WTException,
                                                 WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

removeExistingAssociation

private static void removeExistingAssociation(EPMDocument document,
                                              WTPart part)
                                       throws WTException
Throws:
WTException

createAssociation

public static BinaryLink createAssociation(EPMDocument document,
                                           WTPart partToAssociate,
                                           String assocType,
                                           boolean disassociateExisting)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

modifyPartToAssocVersionIdentifier

public static WTPart modifyPartToAssocVersionIdentifier(WTPart part,
                                                        EPMDocument document,
                                                        WTContainer container)
                                                 throws WTPropertyVetoException,
                                                        WTException
Throws:
WTPropertyVetoException
WTException

setWTPartVersionIdentifier

private static Versioned setWTPartVersionIdentifier(WTPart part,
                                                    EPMDocument doc)
                                             throws WTException,
                                                    WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getAssociatedResultGraph

public static ResultGraph getAssociatedResultGraph(WTCollection seeds,
                                                   boolean includePassive)
                                            throws WTException
Throws:
WTException