Class ValidationError

java.lang.Object
eu.europa.ec.taxud.validation.ValidationError

public class ValidationError extends Object
ValidationError contains information about the error
  • Constructor Details

    • ValidationError

      public ValidationError(int code, String details)
      Error constructor for File-error type
      Parameters:
      code - the code of the error
      details - the detail message for the error
    • ValidationError

      public ValidationError(int code, String details, boolean isFileError)
      Error constructor for File-error type with isFileError option
      Parameters:
      code - the code of the error
      details - the detail message for the error
      isFileError - true if the error is the file itself
    • ValidationError

      public ValidationError(int code, String details, Element element)
      Error constructor for recordError type
      Parameters:
      code - the code of the error
      details - the detail message for the error
      element - the element responsible for the error
    • ValidationError

      public ValidationError(int code, String docRefId, String details, Element element)
      General constructor.
      Parameters:
      code - the code of the error
      docRefId - the docRefId of the group of elements responsible for the error
      details - the detail message of the error
      element - the element responsible for the error
    • ValidationError

      public ValidationError(int code, String docRedId, String details, String path)
      General constructor. Also used for recordError type
      Parameters:
      code - the code of the error
      docRedId - the docRefId of the group of elements responsible for the error
      details - the detail message of the error
      path - the xPath to the field that has the error
  • Method Details

    • getCode

      public int getCode()
      Gets code.
      Returns:
      the code of the error
    • getDetails

      public String getDetails()
      Gets details.
      Returns:
      The details about this error code
    • getDocRefId

      public String getDocRefId()
      Gets doc ref id.
      Returns:
      the documentRefId of the element that has this error
    • getPath

      public String getPath()
      Gets path.
      Returns:
      the xpath of the element that has this error
    • isFileError

      public boolean isFileError()
      Is file error boolean.
      Returns:
      true if this error is classified as a file error