public final class ShaleValidatorAction extends Object
Custom wrapper around a Commons Validator ValidatorAction
that precalculates as many of the introspective lookup operations as
possible. This ensures that runtime operation of the validator checks
can proceed as quickly as possible.
Constructor and Description |
---|
ShaleValidatorAction(org.apache.commons.validator.ValidatorResources resources,
org.apache.commons.validator.ValidatorAction action)
Create a new instance of ShaleValidatorAction that wraps the
specified
ValidatorAction . |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.validator.ValidatorAction |
getAction()
Return the
ValidatorAction instance we are wrapping. |
Object |
getInstance()
Return an instance of the requested validator class, if the requested
validation method is not static.
|
org.apache.commons.validator.Arg[] |
getMessageArgs()
Return an array of argument metadata describing subtitution values
for error messages emitted by this validator type.
|
String |
getMessageKey()
Return the lookup key for the error message template to be used
if this validation fails.
|
Method |
getMethod()
Return the validation
Method to be called for this
action. |
org.apache.commons.validator.Arg[] |
getParameterArgs()
Return an array of argument metadata describing the parameter values
to be sent to the validation method for this validator type.
|
Class[] |
getSignature()
Return the parameter signature for the validation method to be called
for this action.
|
public ShaleValidatorAction(org.apache.commons.validator.ValidatorResources resources, org.apache.commons.validator.ValidatorAction action)
Create a new instance of ShaleValidatorAction that wraps the
specified ValidatorAction
.
resources
- ValidatorResources
for this applicationaction
- The ValidatorAction
to be wrappedIllegalArgumentException
- if configuration data is missing
or incorrectpublic org.apache.commons.validator.ValidatorAction getAction()
Return the ValidatorAction
instance we are wrapping.
public Object getInstance()
Return an instance of the requested validator class, if the requested
validation method is not static. If the method is static, return
null
instead.
public org.apache.commons.validator.Arg[] getMessageArgs()
Return an array of argument metadata describing subtitution values for error messages emitted by this validator type.
public String getMessageKey()
Return the lookup key for the error message template to be used if this validation fails.
public Method getMethod()
Return the validation Method
to be called for this
action.
public org.apache.commons.validator.Arg[] getParameterArgs()
Return an array of argument metadata describing the parameter values to be sent to the validation method for this validator type.
public Class[] getSignature()
Return the parameter signature for the validation method to be called for this action.
Copyright © 2004-2013 Apache Software Foundation. All Rights Reserved.