Interface CustomXMLValidationHook


public interface CustomXMLValidationHook
The interface provides the custom validation service for the translation contents. The interface receives the file name and input stream of the file which is to be validated and need to throw the exception to indicate the custom validation failure for given file. The implementation must state whether the Import Translation Process should fail if the first validation failure has encountered or after the last validation failure. The implementation also needs to populate the error message for failed custom validation for logging purpose.

Supported API: true

Extendable: true
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method returns a boolean, true indicates that the translation process should be failed when the first custom validation failure is encountered.
    This method returns the error message to be logged for custom validation failures.
    void
    This method provides the custom validation for the docs.
  • Method Details

    • failOnFirstError

      boolean failOnFirstError()
      This method returns a boolean, true indicates that the translation process should be failed when the first custom validation failure is encountered.

      Supported API: true
      Returns:
      boolean Boolean value to indicate whether the translation process should be failed when the first validation failure is encountered

      Supported API: true
    • validateXML

      void validateXML(String fileName, InputStream is) throws TranslationException
      This method provides the custom validation for the docs. The specifics of validation is left to customer's implementation.

      Supported API: true
      Parameters:
      fileName - Name of file in the translation zip to validated
      is - InputStream of the file to be validated
      Throws:
      TranslationException -

      Supported API: true
    • getErrorMessage

      String getErrorMessage()
      This method returns the error message to be logged for custom validation failures.

      Supported API: true
      Returns:
      Error message to be logged for validation failures

      Supported API: true