Class AbstractSecurityExpressionHandler<T>
- java.lang.Object
- 
- org.springframework.security.access.expression.AbstractSecurityExpressionHandler<T>
 
- 
- All Implemented Interfaces:
- org.springframework.aop.framework.AopInfrastructureBean,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware,- SecurityExpressionHandler<T>
 - Direct Known Subclasses:
- DefaultMessageSecurityExpressionHandler,- DefaultMethodSecurityExpressionHandler,- DefaultWebSecurityExpressionHandler
 
 public abstract class AbstractSecurityExpressionHandler<T> extends java.lang.Object implements SecurityExpressionHandler<T>, org.springframework.context.ApplicationContextAware Base implementation of the facade which isolates Spring Security's requirements for evaluating security expressions from the implementation of the underlying expression objects.- Since:
- 3.1
 
- 
- 
Constructor SummaryConstructors Constructor Description AbstractSecurityExpressionHandler()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.springframework.expression.EvaluationContextcreateEvaluationContext(Authentication authentication, T invocation)Invokes the internal template methods to createStandardEvaluationContextandSecurityExpressionRootobjects.protected org.springframework.expression.spel.support.StandardEvaluationContextcreateEvaluationContextInternal(Authentication authentication, T invocation)Override to create a custom instance ofStandardEvaluationContext.protected abstract SecurityExpressionOperationscreateSecurityExpressionRoot(Authentication authentication, T invocation)Implement in order to create a root object of the correct type for the supported invocation type.org.springframework.expression.ExpressionParsergetExpressionParser()protected PermissionEvaluatorgetPermissionEvaluator()protected RoleHierarchygetRoleHierarchy()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetExpressionParser(org.springframework.expression.ExpressionParser expressionParser)voidsetPermissionEvaluator(PermissionEvaluator permissionEvaluator)voidsetRoleHierarchy(RoleHierarchy roleHierarchy)
 
- 
- 
- 
Method Detail- 
getExpressionParserpublic final org.springframework.expression.ExpressionParser getExpressionParser() - Specified by:
- getExpressionParserin interface- SecurityExpressionHandler<T>
- Returns:
- an expression parser for the expressions used by the implementation.
 
 - 
setExpressionParserpublic final void setExpressionParser(org.springframework.expression.ExpressionParser expressionParser) 
 - 
createEvaluationContextpublic final org.springframework.expression.EvaluationContext createEvaluationContext(Authentication authentication, T invocation) Invokes the internal template methods to createStandardEvaluationContextandSecurityExpressionRootobjects.- Specified by:
- createEvaluationContextin interface- SecurityExpressionHandler<T>
- Parameters:
- authentication- the current authentication object
- invocation- the invocation (filter, method, channel)
- Returns:
- the context object for use in evaluating the expression, populated with a suitable root object.
 
 - 
createEvaluationContextInternalprotected org.springframework.expression.spel.support.StandardEvaluationContext createEvaluationContextInternal(Authentication authentication, T invocation) Override to create a custom instance ofStandardEvaluationContext.The returned object will have a SecurityExpressionRootPropertyAccessoradded, allowing beans in theApplicationContextto be accessed via expression properties.- Parameters:
- authentication- the current authentication object
- invocation- the invocation (filter, method, channel)
- Returns:
- A StandardEvaluationContextor potentially a custom subclass if overridden.
 
 - 
createSecurityExpressionRootprotected abstract SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, T invocation) Implement in order to create a root object of the correct type for the supported invocation type.- Parameters:
- authentication- the current authentication object
- invocation- the invocation (filter, method, channel)
- Returns:
- the object
 
 - 
getRoleHierarchyprotected RoleHierarchy getRoleHierarchy() 
 - 
setRoleHierarchypublic void setRoleHierarchy(RoleHierarchy roleHierarchy) 
 - 
getPermissionEvaluatorprotected PermissionEvaluator getPermissionEvaluator() 
 - 
setPermissionEvaluatorpublic void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) 
 - 
setApplicationContextpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
 
 
- 
 
-