org.apache.jetspeed.services.security
Interface SecurityCacheService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
SecurityCacheImpl

public interface SecurityCacheService
extends org.apache.turbine.services.Service

The Security Cache Service caches roles and permissions (ACLs)

Version:
$Id: SecurityCacheService.java,v 1.8 2004/02/23 03:58:11 jford Exp $
Author:
David Sean Taylor

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service
 
Method Summary
 void addPermission(java.lang.String roleName, Permission permission)
           
 void addRole(Role role)
          Retrieves a role from the cache for the given username.
 void addRole(java.lang.String username, Role role)
           
 void addRole(java.lang.String username, Role role, Group group)
           
 CachedAcl getAcl(java.lang.String username)
           
 Permission getPermission(java.lang.String roleName, java.lang.String permissionName)
           
 java.util.Iterator getPermissions(java.lang.String roleName)
           
 Role getRole(java.lang.String username, java.lang.String roleName)
          Retrieves a role from the cache for the given username.
 Role getRole(java.lang.String username, java.lang.String roleName, java.lang.String groupName)
           
 java.util.Iterator getRoles(java.lang.String username)
           
 boolean hasPermission(java.lang.String roleName, java.lang.String permissionName)
           
 boolean hasRole(java.lang.String username, java.lang.String roleName)
           
 boolean hasRole(java.lang.String username, java.lang.String roleName, java.lang.String groupName)
           
 void load(java.lang.String username)
           
 void loadRolePermissions()
           
 void removeAllPermissions(java.lang.String permissionName)
           
 void removeAllRoles(java.lang.String rolename)
           
 void removePermission(java.lang.String roleName, java.lang.String permissionName)
           
 void removeRole(java.lang.String username, java.lang.String roleName)
           
 void removeRole(java.lang.String username, java.lang.String roleName, java.lang.String groupName)
           
 void unload(java.lang.String username)
           
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service

See Also:
Constant Field Values
Method Detail

load

public void load(java.lang.String username)
          throws JetspeedSecurityException
Throws:
JetspeedSecurityException

unload

public void unload(java.lang.String username)

loadRolePermissions

public void loadRolePermissions()

getRole

public Role getRole(java.lang.String username,
                    java.lang.String roleName)
Retrieves a role from the cache for the given username.

Parameters:
username - The name key of the user.
roleName - The name of the role.

getRole

public Role getRole(java.lang.String username,
                    java.lang.String roleName,
                    java.lang.String groupName)

addRole

public void addRole(Role role)
Retrieves a role from the cache for the given username.


addRole

public void addRole(java.lang.String username,
                    Role role)

addRole

public void addRole(java.lang.String username,
                    Role role,
                    Group group)

hasRole

public boolean hasRole(java.lang.String username,
                       java.lang.String roleName)

hasRole

public boolean hasRole(java.lang.String username,
                       java.lang.String roleName,
                       java.lang.String groupName)

removeRole

public void removeRole(java.lang.String username,
                       java.lang.String roleName)

removeRole

public void removeRole(java.lang.String username,
                       java.lang.String roleName,
                       java.lang.String groupName)

getRoles

public java.util.Iterator getRoles(java.lang.String username)

getAcl

public CachedAcl getAcl(java.lang.String username)

getPermission

public Permission getPermission(java.lang.String roleName,
                                java.lang.String permissionName)

addPermission

public void addPermission(java.lang.String roleName,
                          Permission permission)

hasPermission

public boolean hasPermission(java.lang.String roleName,
                             java.lang.String permissionName)

removePermission

public void removePermission(java.lang.String roleName,
                             java.lang.String permissionName)

getPermissions

public java.util.Iterator getPermissions(java.lang.String roleName)

removeAllRoles

public void removeAllRoles(java.lang.String rolename)

removeAllPermissions

public void removeAllPermissions(java.lang.String permissionName)


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.