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
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddException(String sheetName, String rowNumber, String exceptionMsg, boolean isWarning) This method provides adds Exceptions or Warnings to single collection which can be thrown during custom validations.voidaddException(String sheetName, String rowNumber, WTException customExceptionOrWarning) This method provides adds Exceptions to single collection which can be thrown during custom validations.
-
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 importedrowNumber- row Number of given row being validatedexceptionMsg- Localized exception message to be givenisWarning- 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 importedrowNumber- row Number of given row being validatedcustomExceptionOrWarning- Exception to be thrown to Import Framework- Throws:
WTException
-