|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jguard.authorization.AbstractAuthorizationManager
Abstract class inherited by all the AuthorizationManager implementations.
| Field Summary | |
protected java.lang.String |
applicationName
|
protected java.util.Map |
domains
|
protected java.util.Set |
domainsSet
|
protected java.util.Map |
principals
|
protected java.util.Set |
principalsSet
|
protected URLPermissionCollection |
urlp
|
| Constructor Summary | |
AbstractAuthorizationManager()
|
|
| Method Summary | |
JGuardPrincipal |
cloneRole(java.lang.String roleName)
clone a JGuardPrincipal/Role. |
abstract void |
createRole(JGuardPrincipal principal)
|
java.security.PermissionCollection |
getPermissionCollection(java.util.Set userPrincipals)
compare declared Principals in the application, with principals set of the user. |
java.util.Set |
getURLDomains(java.util.Collection domainNames)
with a collection of domain names, provide the corresponding set of URLDomains. |
java.util.Set |
getURLPermissions(java.util.Collection permissionNames)
with a collection of URLPermissions names, provide the corresponding set of URLPermissions. |
abstract void |
init(java.util.Map options)
initialize AuthorizationManager implementation. |
java.util.Set |
listDomains()
return Set of domains. |
URLDomain |
readDomain(java.lang.String domainName)
return an URLDomain with its associated URLPermission set. |
java.security.Permission |
readPermission(java.lang.String permissionName)
read an URLPermission. |
JGuardPrincipal |
readRole(java.lang.String roleName)
return the corresponding application role. |
void |
refresh()
refresh principals and permissions data. |
protected void |
removeDomainFromPrincipals(java.lang.String domainName)
Remove the domain from all principals that have relationship with this domain. |
protected void |
removePermissionFromPrincipals(java.lang.String permissionName)
Remove the permission from all principals that have relationship with this permission like a orphaned permission (directly), or through a domain (indirectly). |
void |
setApplicationName(java.lang.String applicationName)
define the application's name, and propagate it into Principals. |
protected void |
updatePrincipals(URLDomain domain)
Update the permissions from jGuardPrincipals that contains this domain. |
protected void |
updatePrincipals(URLDomain newDomain,
java.lang.String oldDomainName)
update the principal with this updated domain. |
protected void |
updatePrincipals(URLPermission permission)
Update the permissions from jGuardPrincipals and the associated domain. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jguard.authorization.AuthorizationManager |
createDomain, createPermission, createRole, deleteDomain, deletePermission, deleteRole, getInitParameters, listPermissions, listRoles, updateDomain, updatePermission, updateRole |
| Field Detail |
protected java.lang.String applicationName
protected java.util.Map principals
protected java.util.Set principalsSet
protected java.util.Map domains
protected java.util.Set domainsSet
protected URLPermissionCollection urlp
| Constructor Detail |
public AbstractAuthorizationManager()
| Method Detail |
public void setApplicationName(java.lang.String applicationName)
setApplicationName in interface AuthorizationManagerapplicationName - public java.util.Set getURLDomains(java.util.Collection domainNames)
getURLDomains in interface AuthorizationManagerpublic java.util.Set getURLPermissions(java.util.Collection permissionNames)
getURLPermissions in interface AuthorizationManagerpermissionNames - collection of permission names to grab.
public abstract void init(java.util.Map options)
init in interface AuthorizationManageroptions - public void refresh()
AuthorizationManager
refresh in interface AuthorizationManagerAuthorizationExceptionAuthorizationManager.refresh()public java.security.PermissionCollection getPermissionCollection(java.util.Set userPrincipals)
getPermissionCollection in interface AuthorizationManageruserPrincipals -
AuthorizationManager.getPermissionCollection(java.util.Set)
public JGuardPrincipal cloneRole(java.lang.String roleName)
throws AuthorizationException
cloneRole in interface AuthorizationManagerroleName - JGuardPrincipal name to clone
AuthorizationException
public abstract void createRole(JGuardPrincipal principal)
throws AuthorizationException
AuthorizationException
public java.util.Set listDomains()
throws AuthorizationException
listDomains in interface AuthorizationManagerAuthorizationExceptionAuthorizationManager.listDomains()
public java.security.Permission readPermission(java.lang.String permissionName)
throws AuthorizationException
readPermission in interface AuthorizationManagerpermissionName -
AuthorizationExceptionAuthorizationManager.readPermission(java.lang.String)
public URLDomain readDomain(java.lang.String domainName)
throws AuthorizationException
readDomain in interface AuthorizationManagerAuthorizationExceptionAuthorizationManager.readDomain(java.lang.String)
public JGuardPrincipal readRole(java.lang.String roleName)
throws AuthorizationException
readRole in interface AuthorizationManagerAuthorizationExceptionAuthorizationManager.readRole(java.lang.String)protected void updatePrincipals(URLDomain domain)
Update the permissions from jGuardPrincipals that contains this domain.
Note: This method is need because, first, there are no warranty that the reference of domain in the JGuardPrincipal object are the same from domainsSet and map and, second, the getPermissions method from JGuardPrincipal don't load the permissions from domains objects (it use a internal set of permissions).
domain - the domain that will be updated in the principalsprotected void updatePrincipals(URLPermission permission)
Update the permissions from jGuardPrincipals and the associated domain.
Note: This method is need because, first, there are no warranty that the reference of domain in the JGuardPrincipal object are the same from domainsSet and map and, second, the getPermissions method from JGuardPrincipal don't load the permissions from domains objects (it use a internal set of permissions).
protected void updatePrincipals(URLDomain newDomain,
java.lang.String oldDomainName)
newDomain - oldDomainName - protected void removeDomainFromPrincipals(java.lang.String domainName)
domainName - the name of the domain that will be removedprotected void removePermissionFromPrincipals(java.lang.String permissionName)
permissionName - the name of the permission that will be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||