|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.access.expression.AbstractSecurityExpressionHandler<T>
public abstract class AbstractSecurityExpressionHandler<T>
Base implementation of the facade which isolates Spring Security's requirements for evaluating security expressions from the implementation of the underlying expression objects.
Constructor Summary | |
---|---|
AbstractSecurityExpressionHandler()
|
Method Summary | |
---|---|
EvaluationContext |
createEvaluationContext(Authentication authentication,
T invocation)
Invokes the internal template methods to create StandardEvaluationContext and SecurityExpressionRoot
objects. |
protected StandardEvaluationContext |
createEvaluationContextInternal(Authentication authentication,
T invocation)
Override to create a custom instance of StandardEvaluationContext . |
protected abstract SecurityExpressionOperations |
createSecurityExpressionRoot(Authentication authentication,
T invocation)
Implement in order to create a root object of the correct type for the supported invocation type. |
ExpressionParser |
getExpressionParser()
|
protected PermissionEvaluator |
getPermissionEvaluator()
|
protected RoleHierarchy |
getRoleHierarchy()
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setExpressionParser(ExpressionParser expressionParser)
|
void |
setPermissionEvaluator(PermissionEvaluator permissionEvaluator)
|
void |
setRoleHierarchy(RoleHierarchy roleHierarchy)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSecurityExpressionHandler()
Method Detail |
---|
public final ExpressionParser getExpressionParser()
getExpressionParser
in interface SecurityExpressionHandler<T>
public final void setExpressionParser(ExpressionParser expressionParser)
public final EvaluationContext createEvaluationContext(Authentication authentication, T invocation)
StandardEvaluationContext
and SecurityExpressionRoot
objects.
createEvaluationContext
in interface SecurityExpressionHandler<T>
authentication
- the current authentication objectinvocation
- the invocation (filter, method, channel)
protected StandardEvaluationContext createEvaluationContextInternal(Authentication authentication, T invocation)
StandardEvaluationContext
.
The returned object will have a SecurityExpressionRootPropertyAccessor
added, allowing beans in
the ApplicationContext
to be accessed via expression properties.
authentication
- the current authentication objectinvocation
- the invocation (filter, method, channel)
StandardEvaluationContext
or potentially a custom subclass if overridden.protected abstract SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, T invocation)
authentication
- the current authentication objectinvocation
- the invocation (filter, method, channel)
protected RoleHierarchy getRoleHierarchy()
public void setRoleHierarchy(RoleHierarchy roleHierarchy)
protected PermissionEvaluator getPermissionEvaluator()
public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator)
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext
in interface ApplicationContextAware
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |