Class DefaultSpreadsheetSingleSheetValidatorDelegate

java.lang.Object
com.ptc.windchill.ixb.importer.custom.validator.delegate.DefaultSpreadsheetSingleSheetValidatorDelegate
All Implemented Interfaces:
SpreadsheetSingleSheetValidatorDelegate

public class DefaultSpreadsheetSingleSheetValidatorDelegate extends Object implements SpreadsheetSingleSheetValidatorDelegate
This class provides the default implementation for custom validation hook for validating at individual sheet level and at row level of any sheet. The implementation must extend this class for adding custom validations at sheet level or at row level. Custom warnings or exceptions thrown from custom validation logic should adhere to pattern mentioned below. 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

    • addException

      public void addException(String sheetName, String rowNumber, String exceptionMsg, boolean isWarning) throws WTException
      This method provides adds Exceptions or Warnings to single collection which can be thrown during custom validations.

      Supported API: true
      Parameters:
      sheetName - Name of current sheet being imported
      rowNumber - row Number of given row being validated
      exceptionMsg - Localized exception message to be given
      isWarning - If true, then Warning would be reported, else will be treated as Error
      Throws:
      WTException
    • addException

      public void addException(String sheetName, String rowNumber, WTException customExceptionOrWarning) throws WTException
      This method provides adds Exceptions to single collection which can be thrown during custom validations.

      Supported API: true
      Parameters:
      sheetName - Name of current sheet being imported
      rowNumber - row Number of given row being validated
      customExceptionOrWarning - Exception to be thrown to Import Framework
      Throws:
      WTException