@StrictBinding(defaultPolicy=ALLOW) public class BindingPolicyManager extends Object
DefaultActionBeanPropertyBinder when binding properties
to an ActionBean.StrictBinding| Modifier | Constructor and Description |
|---|---|
protected |
BindingPolicyManager(Class<?> beanClass)
Create a new instance to handle binding security for the given type.
|
| Modifier and Type | Method and Description |
|---|---|
protected StrictBinding |
getAnnotation(Class<?> beanType)
Get the
StrictBinding annotation for a class, checking all its superclasses if
necessary. |
Class<?> |
getBeanClass()
Get the bean class.
|
StrictBinding.Policy |
getDefaultPolicy()
Get the default policy.
|
static BindingPolicyManager |
getInstance(Class<?> beanType)
Get the policy manager for the given class.
|
protected String[] |
getValidatedProperties(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 Pattern |
globToPattern(String... globArray)
Converts a glob to a regex
Pattern. |
boolean |
isBindingAllowed(PropertyExpressionEvaluation eval)
Indicates if binding is allowed for the given expression.
|
protected boolean |
usesIllegalNodeValueType(PropertyExpressionEvaluation eval)
Indicates if any node in the given
PropertyExpressionEvaluation has a value type that is assignable from
any of the classes listed in ILLEGAL_NODE_VALUE_TYPES. |
protected BindingPolicyManager(Class<?> beanClass)
beanClass - the class to which the binding policy appliespublic static BindingPolicyManager getInstance(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 ActionBeanprotected boolean usesIllegalNodeValueType(PropertyExpressionEvaluation eval)
PropertyExpressionEvaluation has a value type that is assignable from
any of the classes listed in ILLEGAL_NODE_VALUE_TYPES.eval - a property expression that has been evaluated against an ActionBeanprotected StrictBinding getAnnotation(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 String[] getValidatedProperties(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 Class<?> getBeanClass()
public StrictBinding.Policy getDefaultPolicy()
© Copyright 2005-2006, Stripes Development Team.