@StrictBinding(defaultPolicy=ALLOW) public class BindingPolicyManager extends java.lang.Object
DefaultActionBeanPropertyBinder
when binding properties
to an ActionBean
.StrictBinding
Modifier | Constructor and Description |
---|---|
protected |
BindingPolicyManager(java.lang.Class<?> beanClass)
Create a new instance to handle binding security for the given type.
|
Modifier and Type | Method and Description |
---|---|
protected StrictBinding |
getAnnotation(java.lang.Class<?> beanType)
Get the
StrictBinding annotation for a class, checking all its superclasses if
necessary. |
java.lang.Class<?> |
getBeanClass()
Get the bean class.
|
StrictBinding.Policy |
getDefaultPolicy()
Get the default policy.
|
static BindingPolicyManager |
getInstance(java.lang.Class<?> beanType)
Get the policy manager for the given class.
|
protected java.lang.String[] |
getValidatedProperties(java.lang.Class<?> beanClass)
Get all the properties and nested properties of the given class for which there is a
corresponding
ValidationMetadata , as returned by
ValidationMetadataProvider.getValidationMetadata(Class, ParameterName) . |
protected java.util.regex.Pattern |
globToPattern(java.lang.String... globArray)
Converts a glob to a regex
Pattern . |
boolean |
isBindingAllowed(PropertyExpressionEvaluation eval)
Indicates if binding is allowed for the given expression.
|
protected BindingPolicyManager(java.lang.Class<?> beanClass)
beanClass
- the class to which the binding policy appliespublic static BindingPolicyManager getInstance(java.lang.Class<?> beanType)
beanType
- the class whose policy manager is to be retrievedpublic boolean isBindingAllowed(PropertyExpressionEvaluation eval)
eval
- a property expression that has been evaluated against an ActionBean
protected StrictBinding getAnnotation(java.lang.Class<?> beanType)
StrictBinding
annotation for a class, checking all its superclasses if
necessary. If no annotation is found, then one will be returned whose default policy is to
allow binding to all properties.beanType
- the class to get the StrictBinding
annotation forprotected java.lang.String[] getValidatedProperties(java.lang.Class<?> beanClass)
ValidationMetadata
, as returned by
ValidationMetadataProvider.getValidationMetadata(Class, ParameterName)
. The idea
here is that if the bean property must be validated, then it is expected that the property
may be bound to the bean.beanClass
- a classValidationMetadataProvider.getValidationMetadata(Class)
public java.lang.Class<?> getBeanClass()
public StrictBinding.Policy getDefaultPolicy()
protected java.util.regex.Pattern globToPattern(java.lang.String... globArray)
Pattern
.globArray
- an array of property name globs, each of which may be a comma separated list
of globs? Copyright 2005-2006, Stripes Development Team.