|
|||||||||
| Home >> All >> org >> acegisecurity >> taglibs >> [ velocity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.acegisecurity.taglibs.velocity
Class AuthzImpl

java.lang.Objectorg.acegisecurity.taglibs.velocity.AuthzImpl
- All Implemented Interfaces:
- Authz
- public class AuthzImpl
- extends java.lang.Object
- implements Authz
- extends java.lang.Object
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.
| Nested Class Summary | |
private class |
AuthzImpl.MyAclTag
AclTag need to access the application context via the
WebApplicationContextUtils and locate an org.acegisecurity.acl.AclManager. |
private class |
AuthzImpl.MyAuthenticationTag
it must output somthing to JSP page, so have to override the writeMessage method to avoid JSP related operation. |
| Field Summary | |
(package private) static int |
ALL_GRANTED
|
(package private) static int |
ANY_GRANTED
|
private org.springframework.context.ApplicationContext |
appCtx
|
(package private) static int |
NONE_GRANTED
|
| Constructor Summary | |
AuthzImpl()
|
|
| Method Summary | |
boolean |
allGranted(java.lang.String roles)
all the listed roles must be granted to return true, otherwise fasle; |
boolean |
anyGranted(java.lang.String roles)
any the listed roles must be granted to return true, otherwise fasle; |
org.springframework.context.ApplicationContext |
getAppCtx()
set Spring application context which contains acegi related bean |
java.lang.String |
getPrincipal()
implementation of AuthenticationTag |
boolean |
hasPermission(java.lang.Object domainObject,
java.lang.String permissions)
implementation of AclTag |
private boolean |
ifGranted(java.lang.String roles,
int grantType)
implementation of AuthorizeTag |
boolean |
noneGranted(java.lang.String roles)
none the listed roles must be granted to return true, otherwise fasle; |
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 |
| Field Detail |
ALL_GRANTED
static final int ALL_GRANTED
- See Also:
- Constant Field Values
ANY_GRANTED
static final int ANY_GRANTED
- See Also:
- Constant Field Values
NONE_GRANTED
static final int NONE_GRANTED
- See Also:
- Constant Field Values
appCtx
private org.springframework.context.ApplicationContext appCtx
| Constructor Detail |
AuthzImpl
public AuthzImpl()
| Method Detail |
allGranted
public boolean allGranted(java.lang.String roles)
- Description copied from interface:
Authz - all the listed roles must be granted to return true, otherwise fasle;
- Specified by:
allGrantedin interfaceAuthz
anyGranted
public boolean anyGranted(java.lang.String roles)
- Description copied from interface:
Authz - any the listed roles must be granted to return true, otherwise fasle;
- Specified by:
anyGrantedin interfaceAuthz
getAppCtx
public org.springframework.context.ApplicationContext getAppCtx()
- Description copied from interface:
Authz - set Spring application context which contains acegi related bean
getPrincipal
public java.lang.String getPrincipal()
- implementation of AuthenticationTag
- Specified by:
getPrincipalin interfaceAuthz
hasPermission
public boolean hasPermission(java.lang.Object domainObject, java.lang.String permissions)
- implementation of AclTag
- Specified by:
hasPermissionin interfaceAuthz
ifGranted
private boolean ifGranted(java.lang.String roles, int grantType)
- implementation of AuthorizeTag
noneGranted
public boolean noneGranted(java.lang.String roles)
- Description copied from interface:
Authz - none the listed roles must be granted to return true, otherwise fasle;
- Specified by:
noneGrantedin interfaceAuthz
setAppCtx
public void setAppCtx(org.springframework.context.ApplicationContext appCtx)
- test case can use this class to mock application context with aclManager
bean in it.
|
|||||||||
| Home >> All >> org >> acegisecurity >> taglibs >> [ velocity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.acegisecurity.taglibs.velocity.AuthzImpl