Creating a Taxonomic e-Science

org.cateproject.view.authz
Class AuthzImpl

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

public class AuthzImpl
extends Object
implements org.springframework.security.taglibs.velocity.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)
           
 boolean anyGranted(String roles)
           
 org.springframework.context.ApplicationContext getAppCtx()
           
 String getPrincipal()
          implementation of AuthenticationTag
 boolean hasPermission(Object domainObject, String permissions)
          implementation of AclTag
 boolean noneGranted(String roles)
           
 void setAppCtx(org.springframework.context.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)
Specified by:
allGranted in interface org.springframework.security.taglibs.velocity.Authz

anyGranted

public boolean anyGranted(String roles)
Specified by:
anyGranted in interface org.springframework.security.taglibs.velocity.Authz

getAppCtx

public org.springframework.context.ApplicationContext getAppCtx()
Specified by:
getAppCtx in interface org.springframework.security.taglibs.velocity.Authz

getPrincipal

public String getPrincipal()
implementation of AuthenticationTag

Specified by:
getPrincipal in interface org.springframework.security.taglibs.velocity.Authz
Returns:
DOCUMENT ME!
Throws:
IllegalArgumentException - DOCUMENT ME!

hasPermission

public boolean hasPermission(Object domainObject,
                             String permissions)
implementation of AclTag

Parameters:
domainObject - DOCUMENT ME!
permissions - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
IllegalArgumentException - DOCUMENT ME!

noneGranted

public boolean noneGranted(String roles)
Specified by:
noneGranted in interface org.springframework.security.taglibs.velocity.Authz

setAppCtx

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

Specified by:
setAppCtx in interface org.springframework.security.taglibs.velocity.Authz
Parameters:
appCtx - DOCUMENT ME!

Creating a Taxonomic e-Science

Copyright © 2010. All Rights Reserved.