Class AbstractDiscrepancyDelegate
java.lang.Object
com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyProcessor
com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyDelegate
- All Implemented Interfaces:
DiscrepancyDelegate
- Direct Known Subclasses:
AbstractAssembleUnderDelegate,AbstractChangeableDiscrepancyDelegate,AbstractSubcontractDiscrepancyDelegate,AddedUsageDiscrepancyDelegate,com.ptc.windchill.associativity.reconciliation.part.AttributeDiscrepancyDelegate,SCCDiscrepancyDelegate
public abstract class AbstractDiscrepancyDelegate
extends AbstractDiscrepancyProcessor
implements DiscrepancyDelegate
Abstract delegate to define basic flow for Resolver And Detection Phase of Discrepancy
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyProcessor
AbstractDiscrepancyProcessor.ConsumptionDataNested classes/interfaces inherited from interface com.ptc.windchill.associativity.reconciliation.DiscrepancyDelegate
DiscrepancyDelegate.CompareMode -
Field Summary
Fields inherited from class com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyProcessor
BASE_SERVICE_LOCATOR, containerRef, DISCREPANCY_RESOURCE, EMPTY_STRING, EQUIVALENCE_CACHE, EQUIVALENTPART_CACHE, FIRST_LEVEL_EQUIVALENCE_PATHS, MAPSB_PARAM_COPY_OVER_CONTEXT, OCCURRENCE_PATH_CACHE, OTHERSIDE_OCC_PATH_CACHE, OTHERSIDE_USAGE_PATH_CACHE, RESOURCE, UPSTREAM_OCCURRENCE_CACHE -
Method Summary
Modifier and TypeMethodDescriptiondetect(ReconciliationContext context, AssociativePath currentPath, Collection<AssociativePath> oldPaths) Supported API: truefromJSON(ReconciliationContext context, String jsonStr)
Supported API: trueprotected abstract AbstractDiscrepancy2Overridden by extending classes if they wish to use thefromJSON(ReconciliationContext, String)method to populate default data Supported API: trueprotected StringgetDiscrepancyTypeDisplayName(Locale locale, Discrepancy2 discrepancy) By Default DiscrepancyType is displayed as localized String of @{DiscrepancyType} Providing a way for subclasses to extend the logic as per usecase.booleanSupported API: truetoJSON(ReconciliationContext context, Discrepancy2 discrepancy) Builds the default json for the discrepancy.Methods inherited from class com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyProcessor
areEqual, checkoutAndHandleReplacements, createUsageLinkAndGetAssociativePath, doConsumptionAnalysis, fetchAndCacheDownstreamEquivalenceLinks, fetchEquivalenceLinks, fetchEquivalentParts, filterConsumedPaths, filterDownEquivalents, getAllOccurrences, getAllSplitDownEquivalentContextMasters, getAssembleToOrderDAO, getAssociativeDAO, getBomService, getChildrenInfo, getClassificationAttributeDAO, getCopyOverContext, getCopyOverDelegateFactory, getCurrentToOldChangeItems, getDescriptorFactory, getDiscrepancyDelegate, getDiscrepantConsumedOccPaths, getDiscrepantConsumedUsagePaths, getDiscrepantConsumedUsagePaths, getDownConsumedPath, getDownstreamEquivalentContextMasters, getEffectivityDAO, getEquivalenceDAO, getEquivalenceManager, getExpressionService, getFactory, getFilteredDownstreamEquivalent, getFilteredDownstreamEquivalents, getFirstLevelEquivalentPaths, getIteratedDAO, getLocalizedMessage, getLocalizer, getNavCriteriaDAO, getOccurrenceManager, getParentAssociative, getPartDAO, getPartPathManager, getPathManager, getPersistableDAO, getPropertiesParser, getResolutionOption, getUpdateQuantityService, getUsagePathLinkManager, hasEquivalenceAnnotation, isAlternateDiscpreancy, isCheckedOutToAnotherUser, isProcessed, isSamePath, populateEquivalenceConsumptionData, populateImpactedUsageConsumptionData, populateOccurrenceConsumptionData, populateTypeInstances, populateUsageConsumptionData, setDownstreamEquivalentAssociativesToContext, updateAssociativePathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ptc.windchill.associativity.reconciliation.DiscrepancyDelegate
detect, detect, getCompareMode, resolve, verify
-
Method Details
-
isOccurrenceBased
public boolean isOccurrenceBased()Supported API: true- Specified by:
isOccurrenceBasedin interfaceDiscrepancyDelegate- Returns:
-
toJSON
Builds the default json for the discrepancy.
Supported API: true- Specified by:
toJSONin interfaceDiscrepancyDelegate- Parameters:
context- - common datadiscrepancy- - theDiscrepancy2to convert to a JSON string- Returns:
- -
Discrepancy2consistent with JSON. - Throws:
WTException
-
detect
public Collection<Discrepancy2> detect(ReconciliationContext context, AssociativePath currentPath, Collection<AssociativePath> oldPaths) throws WTException Supported API: true- Specified by:
detectin interfaceDiscrepancyDelegate- Parameters:
context-currentPath-oldPaths-- Returns:
- Throws:
WTException
-
fromJSON
Supported API: true- Specified by:
fromJSONin interfaceDiscrepancyDelegate- Parameters:
context- - common datajsonStr- - the JSON string to convert back toDiscrepancy2instance- Returns:
- -
Discrepancy2consistent with JSON. - Throws:
WTException
-
getDiscrepancyInstance
protected abstract AbstractDiscrepancy2 getDiscrepancyInstance(ReconciliationContext context) throws WTException Overridden by extending classes if they wish to use thefromJSON(ReconciliationContext, String)method to populate default data Supported API: true- Returns:
- - bare minimum instance of the discrepancy
- Throws:
WTException
-
getDiscrepancyTypeDisplayName
By Default DiscrepancyType is displayed as localized String of @{DiscrepancyType} Providing a way for subclasses to extend the logic as per usecase.
Supported API: true
- Parameters:
locale- - Locale to localize the value.discrepancy- - Discrepancy for which we need DisplayName.- Returns:
- Localized DiscrepancyType DisplayName
-