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
Supported API: true
Extendable: false - extend
DefaultReconciliationDelegate and custom logic-
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: trueAllows ability to have a custom report instance if needed.Supported API: truevoidOOTB 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).default voidpopulateChangeItemsFromChange(ReconciliationContext context, Collection<DiscrepancyType> types) Default implementation callspopulateChangeItemsFromChange(ReconciliationContext context).postDetect(ReconciliationContext context, ReconciliationReport report) OOTB it builds full path for the MAPSB UI to be able to cross select discrepancies on the UI.postResolve(ReconciliationContext context, ReconciliationReport report) Supported API: truepreDetect(ReconciliationContext context) OOTB does nothing as of now.<T extends Discrepancy2>
voidpreResolve(ReconciliationContext context, Collection<T> discrepancies) Invoked post resolution of discrepancies Supported API: true
Note: Discrepancies can be empty or null.default <T extends Discrepancy2>
voidverify(ReconciliationContext context, Collection<T> discs) Method to allow centralized flow to verify discrepancy status.
-
Method Details
-
getReportInstance
ReconciliationReport getReportInstance()Allows ability to have a custom report instance if needed. Supported API: true- Returns:
-
postDetect
ReconciliationReport postDetect(ReconciliationContext context, ReconciliationReport report) throws WTException 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-ReconciliationContextdiscs-Discrepancy2Collections of discrepancies resolved.- Throws:
WTException
-
orderDiscrepancyTypes
Collection<DiscrepancyType> orderDiscrepancyTypes(Collection<DiscrepancyType> types) throws WTException Supported API: true- Parameters:
types-- Returns:
- Throws:
WTException
-
postResolve
ReconciliationReport postResolve(ReconciliationContext context, ReconciliationReport report) throws WTException Supported API: true- Parameters:
context-report-- Returns:
- Throws:
WTException
-
populateChangeItemsFromChange
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 callspopulateChangeItemsFromChange(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-ReconciliationContextdiscs-Discrepancy2to 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 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
-