Interface ServiceResult<T>


public interface ServiceResult<T>
This interface defines a service result in Zephyr Scale that can contain a generic result if valid or a ValidationResult otherwise.
  • Method Details

    • getResult

      T getResult()
      Returns the value that was returned by the service, or null.
      Returns:
      the value that was returned by the service, or null.
      Since:
      6.8.0
    • isValid

      boolean isValid()
      Returns true if there are no errors, false otherwise.
      Returns:
      true if there are no errors, false otherwise.
      Since:
      6.8.0
    • getValidationResult

      ValidationResult getValidationResult()
      Returns the ValidationResult instance if the result is not valid.
      Returns:
      the ValidationResult instance if the result is not valid.
      Since:
      6.8.0
    • getErrorMessages

      List<String> getErrorMessages()
      Returns a list with error messages if the result is not valid.
      Returns:
      a list with error messages if the result is not valid.
      Since:
      6.8.0
    • getStatusCode

      int getStatusCode()
      Returns the status code that was returned by the service, or null.
      Returns:
      the value that was returned by the service, or null.
      Since:
      9.20.0