org.springframework.security.taglibs.velocity
Class AuthzImpl

java.lang.Object
  extended by org.springframework.security.taglibs.velocity.AuthzImpl
All Implemented Interfaces:
Authz

public class AuthzImpl
extends Object
implements Authz

I decided to wrap several JSP tag in one class, so I have to using inner class to wrap these JSP tag. To using this class, you need to inject Spring Context via SetAppCtx() method. AclTag need Spring Context to get AclManger bean.


Constructor Summary
AuthzImpl()
           
 
Method Summary
 boolean allGranted(String roles)
          all the listed roles must be granted to return true, otherwise false;
 boolean anyGranted(String roles)
          any the listed roles must be granted to return true, otherwise false;
 ApplicationContext getAppCtx()
          get Spring application context which contains
 String getPrincipal()
          implementation of AuthenticationTag
 boolean noneGranted(String roles)
          none the listed roles must be granted to return true, otherwise false;
 void setAppCtx(ApplicationContext appCtx)
          test case can use this class to mock application context with aclManager bean in it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthzImpl

public AuthzImpl()
Method Detail

allGranted

public boolean allGranted(String roles)
Description copied from interface: Authz
all the listed roles must be granted to return true, otherwise false;

Specified by:
allGranted in interface Authz
Parameters:
roles - - comma separate GrantedAuthoritys
Returns:
granted (true|false)

anyGranted

public boolean anyGranted(String roles)
Description copied from interface: Authz
any the listed roles must be granted to return true, otherwise false;

Specified by:
anyGranted in interface Authz
Parameters:
roles - - comma separate GrantedAuthoritys
Returns:
granted (true|false)

getAppCtx

public ApplicationContext getAppCtx()
Description copied from interface: Authz
get Spring application context which contains

Specified by:
getAppCtx in interface Authz

getPrincipal

public String getPrincipal()
implementation of AuthenticationTag

Specified by:
getPrincipal in interface Authz
Returns:
string representation of principal's name

noneGranted

public boolean noneGranted(String roles)
Description copied from interface: Authz
none the listed roles must be granted to return true, otherwise false;

Specified by:
noneGranted in interface Authz
Parameters:
roles - - comma separate GrantedAuthoritys
Returns:
granted (true|false)

setAppCtx

public void setAppCtx(ApplicationContext appCtx)
test case can use this class to mock application context with aclManager bean in it.

Specified by:
setAppCtx in interface Authz