Class ImportValidationResponse

java.lang.Object
com.broadleafcommerce.dataimport.service.ImportValidationResponse

public final class ImportValidationResponse extends Object
Contains detailed information about any validation errors that were found with an import request and file.
Author:
Phillip Verheyden (phillipuniverse), Samarth Dhruva (samarthd)
  • Constructor Details

    • ImportValidationResponse

      public ImportValidationResponse(boolean successful, @Nullable String errorMessage, @Nullable List<LineError> lineErrors)
  • Method Details

    • success

      public static ImportValidationResponse success()
    • generalError

      public static ImportValidationResponse generalError(String errorMessage)
    • lineErrors

      public static ImportValidationResponse lineErrors(String errorMessage, List<LineError> lineErrors)
    • isSuccessful

      public boolean isSuccessful()
      Whether the import was successfully pre-processed.
    • getErrorMessage

      @Nullable public String getErrorMessage()
      If successful is false, this can contain a message describing any general errors with the request that aren't necessarily tied to any particular line number.
    • getLineErrors

      @Nullable public List<LineError> getLineErrors()
      If successful is false, this can describe the problems with specific lines in the import file, if any.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object