@Deprecated public abstract class AbstractValidatingMarshallingPayloadEndpoint extends AbstractMarshallingPayloadEndpoint
AbstractMarshallingPayloadEndpoint
which validates the request payload with Validator
(s). The desired validators can be set using properties, and must support
the request object.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_REQUEST_NAME
Deprecated.
Default request object name used for validating request objects.
|
logger
Constructor and Description |
---|
AbstractValidatingMarshallingPayloadEndpoint()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getRequestName()
Deprecated.
Return the name of the request object for validation error codes.
|
org.springframework.validation.Validator |
getValidator()
Deprecated.
Return the primary Validator for this controller.
|
org.springframework.validation.Validator[] |
getValidators()
Deprecated.
Return the Validators for this controller.
|
protected boolean |
onUnmarshalRequest(MessageContext messageContext,
Object requestObject)
Deprecated.
Callback for post-processing in terms of unmarshalling.
|
protected abstract boolean |
onValidationErrors(MessageContext messageContext,
Object requestObject,
org.springframework.validation.Errors errors)
Deprecated.
Callback for post-processing validation errors.
|
void |
setRequestName(String requestName)
Deprecated.
Set the name of the request object user for validation errors.
|
void |
setValidator(org.springframework.validation.Validator validator)
Deprecated.
Set the primary
Validator for this endpoint. |
void |
setValidators(org.springframework.validation.Validator[] validators)
Deprecated.
Set the Validators for this controller.
|
afterMarshallerSet, afterPropertiesSet, getMarshaller, getUnmarshaller, invoke, invokeInternal, onMarshalResponse, setMarshaller, setUnmarshaller
public static final String DEFAULT_REQUEST_NAME
public AbstractValidatingMarshallingPayloadEndpoint()
public String getRequestName()
public void setRequestName(String requestName)
public org.springframework.validation.Validator getValidator()
public void setValidator(org.springframework.validation.Validator validator)
Validator
for this endpoint. The Validator
is must support the unmarshalled
class. If there are one or more existing validators set already when this method is called, only the specified
validator will be kept. Use setValidators(Validator[])
to set multiple validators.public org.springframework.validation.Validator[] getValidators()
public void setValidators(org.springframework.validation.Validator[] validators)
protected boolean onUnmarshalRequest(MessageContext messageContext, Object requestObject) throws Exception
AbstractMarshallingPayloadEndpoint
Default implementation returns true
.
onUnmarshalRequest
in class AbstractMarshallingPayloadEndpoint
messageContext
- the message contextrequestObject
- the object unmarshalled from the request
true
to continue and call AbstractMarshallingPayloadEndpoint.invokeInternal(Object)
; false
otherwiseException
protected abstract boolean onValidationErrors(MessageContext messageContext, Object requestObject, org.springframework.validation.Errors errors)
messageContext
- the message contextrequestObject
- the object unmarshalled from the request
errors
- validation errors holdertrue
to continue and call AbstractMarshallingPayloadEndpoint.invokeInternal(Object)
; false
otherwise