Class DefaultAutoAssociatePartFinderCreator
java.lang.Object
com.ptc.windchill.uwgm.common.autoassociate.DefaultAutoAssociatePartFinderCreator
- All Implemented Interfaces:
AutoAssociatePartFinderCreator
public class DefaultAutoAssociatePartFinderCreator
extends Object
implements AutoAssociatePartFinderCreator
Supported API: true
Extendable: true Default OOTB implementation of AutoAssociatePartFinderCreator customizable interface. To ensure optimal performance, this class enforces call to one (and only one) of the initSearch*() methods before any other methods are called. If this restriction is not honored, an IllegalStateException will be thrown from methods findOrCreateWTPart(), findWTPart(), and createNewWTPart().
-
Field Summary
Fields inherited from interface com.ptc.windchill.uwgm.common.autoassociate.AutoAssociatePartFinderCreator
IS_NEW_PART -
Method Summary
Modifier and TypeMethodDescriptioncreateNewWTPart(AssociatePartDescriptor newPartDescriptor) Creates a new WTPart object.findOrCreateWTPart(EPMDocument doc, ModelItem modelItem, EPMWorkspace workspace) This method is used for only searchig a WTPart with matching number criteria for a selected EPMDocument in a Workspace.findOrCreateWTPart(EPMDocument epmDoc, EPMWorkspace workspace) This method is used for only searchig a WTPart with matching number criteria for a selected EPMDocument in a Workspace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ptc.windchill.uwgm.common.autoassociate.AutoAssociatePartFinderCreator
findWTPart, findWTPart, isIsNewPart, setIsNewPart
-
Method Details
-
findOrCreateWTPart
public WTPart findOrCreateWTPart(EPMDocument epmDoc, EPMWorkspace workspace) throws WTException, WTPropertyVetoException, VersionControlException, UniquenessException This method is used for only searchig a WTPart with matching number criteria for a selected EPMDocument in a Workspace.
Supported API: true- Specified by:
findOrCreateWTPartin interfaceAutoAssociatePartFinderCreator- Parameters:
epmDoc-workspace-- Returns:
- WTPart
- Throws:
WTExceptionWTPropertyVetoExceptionVersionControlExceptionUniquenessExceptionIllegalStateException- if not initialized with initSearchMatchingParts call
-
findOrCreateWTPart
public WTPart findOrCreateWTPart(EPMDocument doc, ModelItem modelItem, EPMWorkspace workspace) throws WTException, WTPropertyVetoException, VersionControlException, UniquenessException This method is used for only searchig a WTPart with matching number criteria for a selected EPMDocument in a Workspace.
Supported API: true- Specified by:
findOrCreateWTPartin interfaceAutoAssociatePartFinderCreator- Parameters:
modelItem-workspace-epmDoc-- Returns:
- WTPart
- Throws:
WTExceptionWTPropertyVetoExceptionVersionControlExceptionUniquenessExceptionIllegalStateException- if not initialized with initSearchMatchingParts call
-
createNewWTPart
public WTPart createNewWTPart(AssociatePartDescriptor newPartDescriptor) throws WTException, WTPropertyVetoException Creates a new WTPart object. Does not store it, to allow multi-object store later, for performance reasons. initSearchSpecifiedParts() has to be called once before calling this method: an IllegalStateException will be thrown otherwise. This is enforced in order to ensure high-performance check for the uniqueness of the partNumber in case when auto-numbering is OFF. If auto-numbering is ON, partNumber parameter is ignored.
Supported API: true- Specified by:
createNewWTPartin interfaceAutoAssociatePartFinderCreator- Parameters:
newPartDescriptor-- Returns:
- WTPart
- Throws:
WTExceptionWTPropertyVetoException
-