|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.stripes.controller.BindingPolicyManager
@StrictBinding(defaultPolicy=ALLOW) public class BindingPolicyManager
Manages the policies observed by DefaultActionBeanPropertyBinder when binding properties
to an ActionBean.
StrictBinding| Constructor Summary | |
|---|---|
protected |
BindingPolicyManager(Class<?> beanClass)
Create a new instance to handle binding security for the given type. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BindingPolicyManager(Class<?> beanClass)
beanClass - the class to which the binding policy applies| Method Detail |
|---|
public static BindingPolicyManager getInstance(Class<?> beanType)
beanType - the class whose policy manager is to be retrieved
public boolean isBindingAllowed(PropertyExpressionEvaluation eval)
eval - a property expression that has been evaluated against an ActionBean
protected 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 for
protected 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 class
ValidationMetadataProvider.getValidationMetadata(Class)public Class<?> getBeanClass()
public StrictBinding.Policy getDefaultPolicy()
protected Pattern globToPattern(String... globArray)
Pattern.
globArray - an array of property name globs, each of which may be a comma separated list
of globs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||