Class MessageContextErrors
java.lang.Object
org.springframework.validation.AbstractErrors
org.springframework.binding.message.MessageContextErrors
- All Implemented Interfaces:
Serializable
,org.springframework.validation.Errors
public class MessageContextErrors
extends org.springframework.validation.AbstractErrors
Adapts a MessageContext object to the Spring Errors interface. Allows Spring Validators to record errors that are
managed by a backing MessageContext.
- Author:
- Keith Donald
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.validation.Errors
NESTED_PATH_SEPARATOR
-
Constructor Summary
ConstructorDescriptionMessageContextErrors
(MessageContext messageContext, String objectName, Object boundObject, ExpressionParser expressionParser, org.springframework.validation.MessageCodesResolver bindingErrorMessageCodesResolver, MappingResults mappingResults) Creates a new message context errors adapter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllErrors
(org.springframework.validation.Errors errors) List<org.springframework.validation.FieldError>
getFieldValue
(String field) List<org.springframework.validation.ObjectError>
void
void
rejectValue
(String field, String errorCode, Object[] errorArgs, String defaultMessage) Methods inherited from class org.springframework.validation.AbstractErrors
canonicalFieldName, doSetNestedPath, fixedField, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getFieldErrors, getFieldType, getGlobalError, getGlobalErrorCount, getNestedPath, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
-
Constructor Details
-
MessageContextErrors
public MessageContextErrors(MessageContext messageContext, String objectName, Object boundObject, ExpressionParser expressionParser, org.springframework.validation.MessageCodesResolver bindingErrorMessageCodesResolver, MappingResults mappingResults) Creates a new message context errors adapter.- Parameters:
messageContext
- the backing message contextobjectName
- the object nameboundObject
- the model objectexpressionParser
- the expression parserbindingErrorMessageCodesResolver
- the message codes resolvermappingResults
- object mapping results
-
-
Method Details
-
reject
-
rejectValue
-
addAllErrors
public void addAllErrors(org.springframework.validation.Errors errors) -
getObjectName
-
getGlobalErrors
-
getFieldErrors
-
getFieldValue
-