org.apache.jetspeed.security.impl
Class GroupManagerImpl

java.lang.Object
  extended by org.apache.jetspeed.security.impl.GroupManagerImpl
All Implemented Interfaces:
org.apache.jetspeed.security.GroupManager

public class GroupManagerImpl
extends Object
implements org.apache.jetspeed.security.GroupManager

Describes the service interface for managing groups.

Group hierarchy elements are being returned as a Groupcollection. The backing implementation must appropriately map the group hierarchy to a preferences sub-tree.

The convention {principal}.{subprincipal} has been chosen to name groups hierachies. Implementation follow the conventions enforced by the PreferencesAPI.

Author:
David Le Strat , David Sean Taylor

Field Summary
private  org.apache.jetspeed.security.AuthenticationProviderProxy atnProviderProxy
          The authentication provider proxy.
private  org.apache.jetspeed.security.spi.GroupSecurityHandler groupSecurityHandler
          The group security handler.
private static org.apache.commons.logging.Log log
          The logger.
private  org.apache.jetspeed.security.spi.SecurityMappingHandler securityMappingHandler
          The security mapping handler.
 
Constructor Summary
GroupManagerImpl(org.apache.jetspeed.security.SecurityProvider securityProvider)
           
 
Method Summary
 void addGroup(String groupFullPathName)
           
 void addUserToGroup(String username, String groupFullPathName)
           
 org.apache.jetspeed.security.Group getGroup(String groupFullPathName)
           
 Iterator getGroups(String filter)
           
 Collection getGroupsForUser(String username)
           
 Collection getGroupsInRole(String roleFullPathName)
           
 boolean groupExists(String groupFullPathName)
           
 boolean isUserInGroup(String username, String groupFullPathName)
           
 void removeGroup(String groupFullPathName)
           
 void removeUserFromGroup(String username, String groupFullPathName)
           
 void setGroupEnabled(String groupFullPathName, boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
The logger.


atnProviderProxy

private org.apache.jetspeed.security.AuthenticationProviderProxy atnProviderProxy
The authentication provider proxy.


groupSecurityHandler

private org.apache.jetspeed.security.spi.GroupSecurityHandler groupSecurityHandler
The group security handler.


securityMappingHandler

private org.apache.jetspeed.security.spi.SecurityMappingHandler securityMappingHandler
The security mapping handler.

Constructor Detail

GroupManagerImpl

public GroupManagerImpl(org.apache.jetspeed.security.SecurityProvider securityProvider)
Parameters:
securityProvider - The security provider.
Method Detail

addGroup

public void addGroup(String groupFullPathName)
              throws org.apache.jetspeed.security.SecurityException
Specified by:
addGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.addGroup(java.lang.String)

removeGroup

public void removeGroup(String groupFullPathName)
                 throws org.apache.jetspeed.security.SecurityException
Specified by:
removeGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.removeGroup(java.lang.String)

groupExists

public boolean groupExists(String groupFullPathName)
Specified by:
groupExists in interface org.apache.jetspeed.security.GroupManager
See Also:
GroupManager.groupExists(java.lang.String)

getGroup

public org.apache.jetspeed.security.Group getGroup(String groupFullPathName)
                                            throws org.apache.jetspeed.security.SecurityException
Specified by:
getGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.getGroup(java.lang.String)

getGroupsForUser

public Collection getGroupsForUser(String username)
                            throws org.apache.jetspeed.security.SecurityException
Specified by:
getGroupsForUser in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.getGroupsForUser(java.lang.String)

getGroupsInRole

public Collection getGroupsInRole(String roleFullPathName)
                           throws org.apache.jetspeed.security.SecurityException
Specified by:
getGroupsInRole in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.getGroupsInRole(java.lang.String)

addUserToGroup

public void addUserToGroup(String username,
                           String groupFullPathName)
                    throws org.apache.jetspeed.security.SecurityException
Specified by:
addUserToGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.addUserToGroup(java.lang.String, java.lang.String)

removeUserFromGroup

public void removeUserFromGroup(String username,
                                String groupFullPathName)
                         throws org.apache.jetspeed.security.SecurityException
Specified by:
removeUserFromGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.removeUserFromGroup(java.lang.String, java.lang.String)

isUserInGroup

public boolean isUserInGroup(String username,
                             String groupFullPathName)
                      throws org.apache.jetspeed.security.SecurityException
Specified by:
isUserInGroup in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.isUserInGroup(java.lang.String, java.lang.String)

getGroups

public Iterator getGroups(String filter)
                   throws org.apache.jetspeed.security.SecurityException
Specified by:
getGroups in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.getGroups(java.lang.String)

setGroupEnabled

public void setGroupEnabled(String groupFullPathName,
                            boolean enabled)
                     throws org.apache.jetspeed.security.SecurityException
Specified by:
setGroupEnabled in interface org.apache.jetspeed.security.GroupManager
Throws:
org.apache.jetspeed.security.SecurityException
See Also:
GroupManager.setGroupEnabled(java.lang.String, boolean)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.