org.springframework.security.access.expression
Class SecurityExpressionRoot

java.lang.Object
  extended by org.springframework.security.access.expression.SecurityExpressionRoot
Direct Known Subclasses:
WebSecurityExpressionRoot

public abstract class SecurityExpressionRoot
extends Object

Base root object for use in Spring Security expression evaluations.

Since:
3.0

Field Summary
protected  Authentication authentication
           
 boolean denyAll
          Allows "denyAll" expression
 boolean permitAll
          Allows "permitAll" expression
 
Constructor Summary
SecurityExpressionRoot(Authentication a)
           
 
Method Summary
 boolean denyAll()
           
 Authentication getAuthentication()
           
 Object getPrincipal()
           
 boolean hasAnyAuthority(String... authorities)
           
 boolean hasAnyRole(String... roles)
           
 boolean hasAuthority(String authority)
           
 boolean hasRole(String role)
           
 boolean isAnonymous()
           
 boolean isAuthenticated()
           
 boolean isFullyAuthenticated()
           
 boolean isRememberMe()
           
 boolean permitAll()
           
 void setRoleHierarchy(RoleHierarchy roleHierarchy)
           
 void setTrustResolver(AuthenticationTrustResolver trustResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authentication

protected final Authentication authentication

permitAll

public final boolean permitAll
Allows "permitAll" expression

See Also:
Constant Field Values

denyAll

public final boolean denyAll
Allows "denyAll" expression

See Also:
Constant Field Values
Constructor Detail

SecurityExpressionRoot

public SecurityExpressionRoot(Authentication a)
Method Detail

hasAuthority

public final boolean hasAuthority(String authority)

hasAnyAuthority

public final boolean hasAnyAuthority(String... authorities)

hasRole

public final boolean hasRole(String role)

hasAnyRole

public final boolean hasAnyRole(String... roles)

getAuthentication

public final Authentication getAuthentication()

permitAll

public final boolean permitAll()

denyAll

public final boolean denyAll()

isAnonymous

public final boolean isAnonymous()

isAuthenticated

public final boolean isAuthenticated()

isRememberMe

public final boolean isRememberMe()

isFullyAuthenticated

public final boolean isFullyAuthenticated()

getPrincipal

public Object getPrincipal()

setTrustResolver

public void setTrustResolver(AuthenticationTrustResolver trustResolver)

setRoleHierarchy

public void setRoleHierarchy(RoleHierarchy roleHierarchy)