com.ptc.windchill.cadx.autoassociate
Class AutoAssociateHelper

java.lang.Object
  extended bycom.ptc.windchill.cadx.autoassociate.AutoAssociateHelper

public class AutoAssociateHelper
extends Object


Field Summary
private static String CLASSNAME
           
private static String custClass
           
private static String custSearchClassString
           
private static String RESOURCE
           
 
Constructor Summary
AutoAssociateHelper()
           
 
Method Summary
static HashMap associateDocsWithNewOrExistingParts(EPMDocument[] docs, EPMWorkspace workspace)
           
static int containedInSelectedDocs(EPMDocument a_DocToSearch, long[] a_SelectedDocIds)
           
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)
           
private static WTPart createOrCheckoutPartAndAssociate(EPMDocument doc, EPMWorkspace workspace, HashMap OIDCheckedoutPartMap, HashMap associatedPartsInThisCall, boolean isDrawing)
           
static Vector createOrFetchPartsAndAssociate(EPMDocument[] docs, EPMWorkspace workspace)
           
private static WTPart createSuitableAssociation(EPMDocument doc, WTPart part, EPMWorkspace workspace)
           
static AutoAssociatePartFinderCreator getAutoAssociatePartFinderCreator()
           
private static WTPart getCheckedOutPart(WTPart part, EPMDocument doc, EPMWorkspace workspace, HashMap OIDCheckedoutPartMap)
           
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)
           
static WTPart getReferencedPart(EPMDocument doc, ConfigSpec configSpec)
           
static long[] getWindchillIds(Vector a_Documents)
           
private static AutoAssociatePartFinderCreator instantiateProxy(String proxyClassName)
           
private static boolean isDrawingAlreadyAssociatedWithPart(EPMDocument drawing, WTPart part)
           
 
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

custSearchClassString

private static String custSearchClassString
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)

createSuitableAssociation

private static WTPart createSuitableAssociation(EPMDocument doc,
                                                WTPart part,
                                                EPMWorkspace workspace)

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 HashMap associateDocsWithNewOrExistingParts(EPMDocument[] docs,
                                                          EPMWorkspace workspace)
                                                   throws WTException
Throws:
WTException

isDrawingAlreadyAssociatedWithPart

private static boolean isDrawingAlreadyAssociatedWithPart(EPMDocument drawing,
                                                          WTPart part)

createOrCheckoutPartAndAssociate

private static WTPart createOrCheckoutPartAndAssociate(EPMDocument doc,
                                                       EPMWorkspace workspace,
                                                       HashMap OIDCheckedoutPartMap,
                                                       HashMap associatedPartsInThisCall,
                                                       boolean isDrawing)
                                                throws Exception
Throws:
Exception

getCheckedOutPart

private static WTPart getCheckedOutPart(WTPart part,
                                        EPMDocument doc,
                                        EPMWorkspace workspace,
                                        HashMap OIDCheckedoutPartMap)

getOID

public static String getOID(Persistable obj)

getReferencedPart

public static WTPart getReferencedPart(EPMDocument doc,
                                       ConfigSpec configSpec)

containedInSelectedDocs

public static int containedInSelectedDocs(EPMDocument a_DocToSearch,
                                          long[] a_SelectedDocIds)

getWindchillIds

public static long[] getWindchillIds(Vector a_Documents)

getFilteredReferedDoc

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