com.ptc.windchill.cadx.autoassociate
Class DefaultAutoAssociatePartFinderCreator

java.lang.Object
  extended bycom.ptc.windchill.cadx.autoassociate.DefaultAutoAssociatePartFinderCreator
All Implemented Interfaces:
AutoAssociatePartFinderCreator

public class DefaultAutoAssociatePartFinderCreator
extends Object
implements AutoAssociatePartFinderCreator



Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String custSearchClassString
           
private  boolean isNewPart
           
private  int policy
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from interface com.ptc.windchill.cadx.autoassociate.AutoAssociatePartFinderCreator
IS_NEW_PART
 
Constructor Summary
DefaultAutoAssociatePartFinderCreator()
           
 
Method Summary
 WTPart createNewWTPart(EPMDocument epmDoc, String a_PartNumber, String a_PartName, PartType a_PartType, String a_folderOID, EPMWorkspace a_CurrentWS, WTOrganization a_org, Source a_source, QuantityUnit a_defaultUnits)
           
 WTPart findOrCreateWTPart(EPMDocument epmDoc, EPMWorkspace workspace)
          This method is used for finding or creating a single WTPart for a selected EPMDocument in a Workspace, if a WTPart is not found in Windchill w.r.t the preference settings it will create one.
 WTPart findWTPart(EPMDocument epmDoc)
          This method finds a part to be associated to a document based on the preference settings specified.
 boolean isIsNewPart()
          Gets the value of the attribute: isNewPart.
private  WTPart searchForPart(EPMDocument epmdoc, EPMWorkspace ws)
           
private  WTPart searchPart(String partNumber, EPMWorkspace ws)
           
 void setIsNewPart(boolean a_IsNewPart)
          Sets the value of the attribute: isNewPart.
 
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

isNewPart

private boolean isNewPart

VERBOSE

private static boolean VERBOSE

policy

private int policy

custSearchClassString

private static String custSearchClassString
Constructor Detail

DefaultAutoAssociatePartFinderCreator

public DefaultAutoAssociatePartFinderCreator()
Method Detail

isIsNewPart

public boolean isIsNewPart()
Gets the value of the attribute: isNewPart.

Supported API: false

Specified by:
isIsNewPart in interface AutoAssociatePartFinderCreator
Returns:
boolean

setIsNewPart

public void setIsNewPart(boolean a_IsNewPart)
                  throws WTPropertyVetoException
Sets the value of the attribute: isNewPart.

Supported API: false

Specified by:
setIsNewPart in interface AutoAssociatePartFinderCreator
Parameters:
a_IsNewPart -
Throws:
WTPropertyVetoException

findOrCreateWTPart

public WTPart findOrCreateWTPart(EPMDocument epmDoc,
                                 EPMWorkspace workspace)
                          throws WTException,
                                 WTPropertyVetoException,
                                 VersionControlException,
                                 UniquenessException
This method is used for finding or creating a single WTPart for a selected EPMDocument in a Workspace, if a WTPart is not found in Windchill w.r.t the preference settings it will create one.

Supported API: true

Specified by:
findOrCreateWTPart in interface AutoAssociatePartFinderCreator
Parameters:
epmDoc -
workspace -
Returns:
WTPart
Throws:
WTException
WTPropertyVetoException
VersionControlException
UniquenessException

findWTPart

public WTPart findWTPart(EPMDocument epmDoc)
                  throws WTException,
                         WTPropertyVetoException,
                         VersionControlException,
                         UniquenessException
This method finds a part to be associated to a document based on the preference settings specified. The user has to specify a preference setting named 'SearchForPartAttribute' in "cfgsiteautoassociate,ini " file. Against this preference setting the user can specify an attribute name (in upper case). The value of this attribute will be partnumber in UPPERCASE by default. A WTPart will be returned to the user by this method.

Supported API: true

Specified by:
findWTPart in interface AutoAssociatePartFinderCreator
Parameters:
epmDoc -
Returns:
WTPart
Throws:
WTException
WTPropertyVetoException
VersionControlException
UniquenessException

searchPart

private WTPart searchPart(String partNumber,
                          EPMWorkspace ws)

searchForPart

private WTPart searchForPart(EPMDocument epmdoc,
                             EPMWorkspace ws)

createNewWTPart

public WTPart createNewWTPart(EPMDocument epmDoc,
                              String a_PartNumber,
                              String a_PartName,
                              PartType a_PartType,
                              String a_folderOID,
                              EPMWorkspace a_CurrentWS,
                              WTOrganization a_org,
                              Source a_source,
                              QuantityUnit a_defaultUnits)
                       throws WTException,
                              WTPropertyVetoException,
                              VersionControlException,
                              UniquenessException
Specified by:
createNewWTPart in interface AutoAssociatePartFinderCreator
Throws:
WTException
WTPropertyVetoException
VersionControlException
UniquenessException