Interface SpreadsheetWorkbookDataValidatorDelegate

All Known Implementing Classes:
DefaultSpreadsheetWorkbookDataValidatorDelegate

public interface SpreadsheetWorkbookDataValidatorDelegate
The interface provides the custom validation hook for validating at Workbook level for adding validations across sheets. The implementation must extend this interface for adding custom validations at workbook level. The @DefaultSpreadsheetWorkbookDataValidatorDelegate provides default implementation which can be extended for further use. Custom warnings or exceptions thrown from custom validation logic should adhere to pattern mentioned in @DefaultSpreadsheetWorkbookDataValidatorDelegate They should add warnings or exceptions to single list with all details, which will be returned by API getErrorsOrWarnings().

Supported API: true

Extendable: true
  • Method Details

    • validateFieldsForAllSheetsInWorkbook

      void validateFieldsForAllSheetsInWorkbook(Map<String,Map<String,Map<String,Map>>> allWorkbookInformation, Locale locale) throws WTException
      This method provides the custom validation for the entire workbook. The specifics of validation is left to customer's implementation where customer will have access to entire workbook data and group of sheets along with all rows present in given sheet.

      Supported API: true
      Parameters:
      allWorkbookInformation - This will give all import data in form of Map of ImportType as key, and value is Map of SheetNames against RowInformation. This is again a Map with RowNumber as key and RowData as value. Import type can be PART,BOM etc.
      locale -
      Locale - Locale to display or generate localized error or warning messages
      Throws:
      WTException
    • getErrorsOrWarnings

      List<WTException> getErrorsOrWarnings()
      This method returns list of custom warnings or exceptions thrown by custom logic during validations. Custom implementation should override this API to return warnings or exceptions to be shown on Import from Spreadsheet UI.

      Supported API: true
      Returns:
      List List of exceptions/warnings thrown from custom logic, to be returned to ImportService
      Throws:
      WTException