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 AbstractDiscrepancyDelegate for custom discrepancy delegate.

Supported API: true

Extendable: false
  • 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
      invalid reference
      Discrepancy2#getResovedPath()
      . This method can be optional for discrepancies which cannot be resolved automatically i.e their status is Discrepancy2.Status.MANUAL Supported API: true
      Parameters:
      context - - the common data
      discrepancies - - 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 for Discrepancy2.getStatus() and Discrepancy2.getStatusMessage(). This method can be optional if there is no need for separation of logic from
      invalid reference
      #find(ReconciliationContext)
      Supported API: true
      Parameters:
      context - - the common data
      discrepancies - - 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

      default DiscrepancyDelegate.CompareMode 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