Interface ReconciliationDelegate

All Known Implementing Classes:
DefaultReconciliationDelegate

public interface ReconciliationDelegate
The interface to define custom delete for the overall flow of detect and resolve discrepancies.

Supported API: true

Extendable: false - extend DefaultReconciliationDelegate and custom logic
  • Method Details

    • getReportInstance

      ReconciliationReport getReportInstance()
      Allows ability to have a custom report instance if needed. Supported API: true
      Returns:
    • postDetect

      OOTB it builds full path for the MAPSB UI to be able to cross select discrepancies on the UI. Supported API: true
      Parameters:
      context -
      report -
      Returns:
      Throws:
      WTException
    • preDetect

      OOTB does nothing as of now. But can be implemented to cache things in the context or populate extra information Supported API: true
      Parameters:
      context -
      Returns:
      Throws:
      WTException
    • preResolve

      <T extends Discrepancy2> void preResolve(ReconciliationContext context, Collection<T> discrepancies) throws WTException
      Invoked post resolution of discrepancies Supported API: true
      Note: Discrepancies can be empty or null.
      Parameters:
      context - ReconciliationContext
      discs - Discrepancy2 Collections of discrepancies resolved.
      Throws:
      WTException
    • orderDiscrepancyTypes

      Collection<DiscrepancyType> orderDiscrepancyTypes(Collection<DiscrepancyType> types) throws WTException
      Supported API: true
      Parameters:
      types -
      Returns:
      Throws:
      WTException
    • postResolve

      Supported API: true
      Parameters:
      context -
      report -
      Returns:
      Throws:
      WTException
    • populateChangeItemsFromChange

      void populateChangeItemsFromChange(ReconciliationContext context) throws WTException
      OOTB populates the context with change items (resulting objects of a change notice or change task) and change context (that one object amongst the resulting objects that is an end item). But can be implemented to get the change items and change context in some other way. Supported API: true
      Parameters:
      context -
      Throws:
      WTException
    • populateChangeItemsFromChange

      default void populateChangeItemsFromChange(ReconciliationContext context, Collection<DiscrepancyType> types) throws WTException
      Default implementation calls populateChangeItemsFromChange(ReconciliationContext context). But can be implemented to get the change items and change context in some other way based on discrepancyTypes or some other custom logic Supported API: true
      Parameters:
      context -
      Throws:
      WTException
    • verify

      default <T extends Discrepancy2> void verify(ReconciliationContext context, Collection<T> discs) throws WTException
      Method to allow centralized flow to verify discrepancy status. OOTB this method is called for same type of discrepancies and calls the actual discrepancy delegate verifier to get the default status. Then there can be custom logic to override the status based on specific needs Supported API: true
      Parameters:
      context - ReconciliationContext
      discs - Discrepancy2 to verify if can be resolved or not and populate status
      Throws:
      WTException
    • getLocalRules

      String getLocalRules(ReconciliationContext context, AddUsageDiscrepancy discrepancy) throws WTException
      Returns GDS rules as a JSON string from the discrepancy Supported API: true
      Throws:
      WTException
    • areValuesEqual

      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

      Parameters:
      configuredValue - - string format value read from configuration for a given attribute
      persistedValue - - 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 value
      considerReferenceValue - - this flag is needed as no way to know if referenceValue is null or not asked to compare
      rangeDelimiter - - delimiter to understand if the value is a range
      Returns:
      Throws:
      WTException