Class DefaultReconciliationDelegate
java.lang.Object
com.ptc.windchill.associativity.reconciliation.AbstractDiscrepancyProcessor
com.ptc.windchill.associativity.reconciliation.DefaultReconciliationDelegate
- All Implemented Interfaces:
ReconciliationDelegate
public class DefaultReconciliationDelegate
extends AbstractDiscrepancyProcessor
implements ReconciliationDelegate
The delegate is to extend to define custom logic for the overall flow of detect and resolve discrepancies.
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.ConsumptionData -
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 TypeMethodDescriptionbooleanareValuesEqual(String configuredValue, Object persistedValue, Object referenceValue, boolean considerReferenceValue, String rangeDelimiter) OOTB does string compare and can be overridden to have custom comparison logic.getLocalRules(ReconciliationContext context, AddUsageDiscrepancy discrepancy) Returns GDS rules as a JSON string from the discrepancy Supported API: true
Supported API: trueprotected voidhandleAutoCheckin(ReconciliationContext context, ReconciliationReport report) Hook to override auto-checkin behaviour.
Supported API: truevoid
Supported API: truevoidpopulateChangeItemsFromChange(ReconciliationContext context, Collection<DiscrepancyType> types)
Supported API: truepostDetect(ReconciliationContext context, ReconciliationReport report)
Supported API: truepostResolve(ReconciliationContext context, ReconciliationReport report)
Supported API: truepreDetect(ReconciliationContext context)
Supported API: true<T extends Discrepancy2>
voidpreResolve(ReconciliationContext context, Collection<T> discrepancies)
Supported API: trueMethods 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, updateAssociativePath
-
Method Details
-
preDetect
Supported API: true- Specified by:
preDetectin interfaceReconciliationDelegate- Parameters:
context-- Returns:
- Throws:
WTException
-
postDetect
public ReconciliationReport postDetect(ReconciliationContext context, ReconciliationReport report) throws WTException
Supported API: true- Specified by:
postDetectin interfaceReconciliationDelegate- Parameters:
context-report-- Returns:
- Throws:
WTException
-
getReportInstance
Supported API: true- Specified by:
getReportInstancein interfaceReconciliationDelegate- Returns:
-
postResolve
public ReconciliationReport postResolve(ReconciliationContext context, ReconciliationReport report) throws WTException
Supported API: true- Specified by:
postResolvein interfaceReconciliationDelegate- Parameters:
context-report-- Returns:
- Throws:
WTException
-
handleAutoCheckin
protected void handleAutoCheckin(ReconciliationContext context, ReconciliationReport report) throws WTException Hook to override auto-checkin behaviour. This is called viapostResolve(ReconciliationContext, ReconciliationReport)ifAbstractReconciliationContext.isAutoCheckInEnabled()is true
Supported API: true- Parameters:
context-report-- Throws:
WTException
-
preResolve
public <T extends Discrepancy2> void preResolve(ReconciliationContext context, Collection<T> discrepancies) throws WTException
Supported API: true- Specified by:
preResolvein interfaceReconciliationDelegate- Parameters:
context-ReconciliationContext- Throws:
WTException
-
orderDiscrepancyTypes
public Collection<DiscrepancyType> orderDiscrepancyTypes(Collection<DiscrepancyType> types) throws WTException
Supported API: true- Specified by:
orderDiscrepancyTypesin interfaceReconciliationDelegate- Parameters:
types-- Returns:
- Throws:
WTException
-
populateChangeItemsFromChange
Supported API: true- Specified by:
populateChangeItemsFromChangein interfaceReconciliationDelegate- Parameters:
context-- Throws:
WTException
-
populateChangeItemsFromChange
public void populateChangeItemsFromChange(ReconciliationContext context, Collection<DiscrepancyType> types) throws WTException
Supported API: true- Specified by:
populateChangeItemsFromChangein interfaceReconciliationDelegate- Parameters:
context-- Throws:
WTException
-
getLocalRules
public String getLocalRules(ReconciliationContext context, AddUsageDiscrepancy discrepancy) throws WTException Returns GDS rules as a JSON string from the discrepancy Supported API: true- Specified by:
getLocalRulesin interfaceReconciliationDelegate- Throws:
WTException
-
areValuesEqual
public boolean areValuesEqual(String configuredValue, Object persistedValue, Object referenceValue, boolean considerReferenceValue, String rangeDelimiter) throws WTException OOTB does string compare and can be overridden to have custom comparison logic. If the configured value is null/empty and persisted value is null as well, we treat them equal. If both are not null, then we do string compare with ignore case and return result else return false.
Supported API: true
- Specified by:
areValuesEqualin interfaceReconciliationDelegate- Parameters:
configuredValue- - string format value read from configuration for a given attributepersistedValue- - the persisted value from the database for a given attribute.referenceValue- - a value with which persisted value should be compared in case no value is configured, typically upstream valueconsiderReferenceValue- - this flag is needed as no way to know if referenceValue is null or not asked to comparerangeDelimiter- - delimiter to understand if the value is a range- Returns:
- Throws:
WTException
-