Class DelegatingErrors

java.lang.Object
net.solarnetwork.central.support.DelegatingErrors
All Implemented Interfaces:
org.springframework.validation.Errors

public class DelegatingErrors extends Object implements org.springframework.validation.Errors
Helper class to make overwriting some methods on an existing Errors instance.

Extending classes can pick/choose methods to overwrite, to make overwriting easier.

Since:
2.10
  • Field Details

    • errors

      protected final org.springframework.validation.Errors errors
      The delegate errors object.
  • Constructor Details

    • DelegatingErrors

      public DelegatingErrors(org.springframework.validation.Errors errors)
      Constructor.
      Parameters:
      errors - the errors to delegate to
  • Method Details

    • getObjectName

      public String getObjectName()
      Specified by:
      getObjectName in interface org.springframework.validation.Errors
    • setNestedPath

      public void setNestedPath(String nestedPath)
      Specified by:
      setNestedPath in interface org.springframework.validation.Errors
    • getNestedPath

      public String getNestedPath()
      Specified by:
      getNestedPath in interface org.springframework.validation.Errors
    • pushNestedPath

      public void pushNestedPath(String subPath)
      Specified by:
      pushNestedPath in interface org.springframework.validation.Errors
    • popNestedPath

      public void popNestedPath() throws IllegalStateException
      Specified by:
      popNestedPath in interface org.springframework.validation.Errors
      Throws:
      IllegalStateException
    • reject

      public void reject(String errorCode)
      Specified by:
      reject in interface org.springframework.validation.Errors
    • reject

      public void reject(String errorCode, String defaultMessage)
      Specified by:
      reject in interface org.springframework.validation.Errors
    • reject

      public void reject(String errorCode, Object[] errorArgs, String defaultMessage)
      Specified by:
      reject in interface org.springframework.validation.Errors
    • rejectValue

      public void rejectValue(String field, String errorCode)
      Specified by:
      rejectValue in interface org.springframework.validation.Errors
    • rejectValue

      public void rejectValue(String field, String errorCode, String defaultMessage)
      Specified by:
      rejectValue in interface org.springframework.validation.Errors
    • rejectValue

      public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage)
      Specified by:
      rejectValue in interface org.springframework.validation.Errors
    • addAllErrors

      public void addAllErrors(org.springframework.validation.Errors errors)
      Specified by:
      addAllErrors in interface org.springframework.validation.Errors
    • hasErrors

      public boolean hasErrors()
      Specified by:
      hasErrors in interface org.springframework.validation.Errors
    • getErrorCount

      public int getErrorCount()
      Specified by:
      getErrorCount in interface org.springframework.validation.Errors
    • getAllErrors

      public List<org.springframework.validation.ObjectError> getAllErrors()
      Specified by:
      getAllErrors in interface org.springframework.validation.Errors
    • hasGlobalErrors

      public boolean hasGlobalErrors()
      Specified by:
      hasGlobalErrors in interface org.springframework.validation.Errors
    • getGlobalErrorCount

      public int getGlobalErrorCount()
      Specified by:
      getGlobalErrorCount in interface org.springframework.validation.Errors
    • getGlobalErrors

      public List<org.springframework.validation.ObjectError> getGlobalErrors()
      Specified by:
      getGlobalErrors in interface org.springframework.validation.Errors
    • getGlobalError

      public org.springframework.validation.ObjectError getGlobalError()
      Specified by:
      getGlobalError in interface org.springframework.validation.Errors
    • hasFieldErrors

      public boolean hasFieldErrors()
      Specified by:
      hasFieldErrors in interface org.springframework.validation.Errors
    • getFieldErrorCount

      public int getFieldErrorCount()
      Specified by:
      getFieldErrorCount in interface org.springframework.validation.Errors
    • getFieldErrors

      public List<org.springframework.validation.FieldError> getFieldErrors()
      Specified by:
      getFieldErrors in interface org.springframework.validation.Errors
    • getFieldError

      public org.springframework.validation.FieldError getFieldError()
      Specified by:
      getFieldError in interface org.springframework.validation.Errors
    • hasFieldErrors

      public boolean hasFieldErrors(String field)
      Specified by:
      hasFieldErrors in interface org.springframework.validation.Errors
    • getFieldErrorCount

      public int getFieldErrorCount(String field)
      Specified by:
      getFieldErrorCount in interface org.springframework.validation.Errors
    • getFieldErrors

      public List<org.springframework.validation.FieldError> getFieldErrors(String field)
      Specified by:
      getFieldErrors in interface org.springframework.validation.Errors
    • getFieldError

      public org.springframework.validation.FieldError getFieldError(String field)
      Specified by:
      getFieldError in interface org.springframework.validation.Errors
    • getFieldValue

      public Object getFieldValue(String field)
      Specified by:
      getFieldValue in interface org.springframework.validation.Errors
    • getFieldType

      public Class<?> getFieldType(String field)
      Specified by:
      getFieldType in interface org.springframework.validation.Errors