Interface DiscrepancyDelegate
- All Known Implementing Classes:
AbstractAssembleUnderDelegate,AbstractChangeableDiscrepancyDelegate,AbstractDiscrepancyDelegate,AbstractSubcontractDiscrepancyDelegate,AddedUsageDiscrepancyDelegate,com.ptc.windchill.associativity.reconciliation.part.AttributeDiscrepancyDelegate,ItemExpressionDiscrepancyDelegate,OccurrenceAttributeDiscrepancyDelegate,SCCDiscrepancyDelegate
public interface DiscrepancyDelegate
Interface for Discrepancy Delegate. Recommended to extend
Supported API: true
Extendable: false
AbstractDiscrepancyDelegate for custom discrepancy
delegate.
Supported API: true
Extendable: false
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Supported API: true
Extendable: false -
Method Summary
Modifier and TypeMethodDescriptiondefault DiscrepancyDelegate.CompareModeSupported API: true
for backward compatibility, we will treat custom delegates from customers as they not supporting SSA.resolve(ReconciliationContext context, Collection<? extends Discrepancy2> discrepancies) The method to resolve the discrepancies.voidverify(ReconciliationContext context, Collection<? extends Discrepancy2> discrepancies) Mainly responsible to tell if the collected discrepancies as part of find are valid and can be consumed.
-
Method Details
-
resolve
ReconciliationReport resolve(ReconciliationContext context, Collection<? extends Discrepancy2> discrepancies) throws WTException The method to resolve the discrepancies. It can be assumed that all the discrepancies as input are of same type as service will typically group them. This will return ReconciliationReport with the resolved discrepancies. It maybe noted that returned discrepancies can be more than the input discrepancies since there could be multiple downstream targets. Make sure to populate the. This method can be optional for discrepancies which cannot be resolved automatically i.e their status isinvalid reference
Discrepancy2#getResovedPath()Discrepancy2.Status.MANUALSupported API: true- Parameters:
context- - the common datadiscrepancies- - the discrepancies to resolve. can be assumed to be of same type against which the delegate configuration is done. these should not be updated by this method, but create new instances for returning.- Returns:
- - returns ReconciliationReport containing all resolved discrepancies
- Throws:
WTException
-
verify
void verify(ReconciliationContext context, Collection<? extends Discrepancy2> discrepancies) throws WTException Mainly responsible to tell if the collected discrepancies as part of find are valid and can be consumed. This just gives separation of logic to find a discrepancy and verify if its still valid and can be handled by resolve and like that. OOTB the UI calls this after find to update the status of discrepancy to tell user if it can be resolved or not. This will typically update the input discrepancies forDiscrepancy2.getStatus()andDiscrepancy2.getStatusMessage(). This method can be optional if there is no need for separation of logic fromSupported API: trueinvalid reference
#find(ReconciliationContext)- Parameters:
context- - the common datadiscrepancies- - the discrepancies to resolve. can be assumed to be of same type against which the delegate configuration is done. this method may update the discrepancies- Throws:
WTException
-
getCompareMode
Supported API: true
for backward compatibility, we will treat custom delegates from customers as they not supporting SSA. they need to enhance them to support SSA by enhancing the detector and overriding this method to return true. There could be cases some discrepancies dont make sense for SSA as well or viceversa so such flag can help there, then we can return an enum telling what the delegate supports
-