org.apache.jetspeed.security.spi.impl
Class LdapGroupSecurityHandler

java.lang.Object
  extended byorg.apache.jetspeed.security.spi.impl.LdapGroupSecurityHandler
All Implemented Interfaces:
GroupSecurityHandler

public class LdapGroupSecurityHandler
extends Object
implements GroupSecurityHandler

Author:
Mike Long
David Le Strat
See Also:
GroupSecurityHandler

Field Summary
private  LdapPrincipalDao ldap
          The LdapPrincipalDao.
private static org.apache.commons.logging.Log LOG
          The logger.
 
Constructor Summary
LdapGroupSecurityHandler()
           Default constructor.
LdapGroupSecurityHandler(LdapPrincipalDao ldap)
           
 
Method Summary
private  String convertUidToAcceptableName(String uid)
           Converts the uid to an acceptable ldap name.
 Principal getGroupPrincipal(String groupPrincipalUid)
           Gets the group principal for the group full path name {principal}.{subprincipal}.
 List getGroupPrincipals(String filter)
           Gets the an iterator of group principals for a given filter.
private  void logSecurityException(org.apache.jetspeed.security.SecurityException e, String groupPrincipalUid)
           Log the security exception.
 void removeGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)
           Removes the group principal.
 void setGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)
           Sets the group principal in the backing store.
private  void verifyGroupId(String groupPrincipalUid)
           Verify that the group uid is valid.
private  void verifyGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)
           Verify that the group principal is valid.
 
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.


ldap

private LdapPrincipalDao ldap
The LdapPrincipalDao.

Constructor Detail

LdapGroupSecurityHandler

public LdapGroupSecurityHandler(LdapPrincipalDao ldap)
Parameters:
ldap - The LdapPrincipalDao.

LdapGroupSecurityHandler

public LdapGroupSecurityHandler()
                         throws NamingException,
                                org.apache.jetspeed.security.SecurityException

Default constructor.

Throws:
NamingException - A NamingException.
org.apache.jetspeed.security.SecurityException - A SecurityException.
Method Detail

getGroupPrincipal

public Principal getGroupPrincipal(String groupPrincipalUid)
Description copied from interface: GroupSecurityHandler

Gets the group principal for the group full path name {principal}.{subprincipal}.

Specified by:
getGroupPrincipal in interface GroupSecurityHandler
Parameters:
groupPrincipalUid - The group full path name.
Returns:
The Principal

See Also:
GroupSecurityHandler.getGroupPrincipal(java.lang.String)

verifyGroupId

private void verifyGroupId(String groupPrincipalUid)

Verify that the group uid is valid.

Parameters:
groupPrincipalUid - The group uid.

logSecurityException

private void logSecurityException(org.apache.jetspeed.security.SecurityException e,
                                  String groupPrincipalUid)

Log the security exception.

Parameters:
e - The SecurityException.
groupPrincipalUid - The group principal uid.

setGroupPrincipal

public void setGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)
                       throws org.apache.jetspeed.security.SecurityException
Description copied from interface: GroupSecurityHandler

Sets the group principal in the backing store.

Specified by:
setGroupPrincipal in interface GroupSecurityHandler
Parameters:
groupPrincipal - The GroupPrincipal.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.
See Also:
GroupSecurityHandler.setGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal)

convertUidToAcceptableName

private String convertUidToAcceptableName(String uid)

Converts the uid to an acceptable ldap name.

Parameters:
uid - The uid.
Returns:
The acceptable name.

verifyGroupPrincipal

private void verifyGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)

Verify that the group principal is valid.

Parameters:
groupPrincipal - The group principal.

removeGroupPrincipal

public void removeGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal groupPrincipal)
                          throws org.apache.jetspeed.security.SecurityException
Description copied from interface: GroupSecurityHandler

Removes the group principal.

Specified by:
removeGroupPrincipal in interface GroupSecurityHandler
Parameters:
groupPrincipal - The GroupPrincipal.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.
See Also:
GroupSecurityHandler.removeGroupPrincipal(org.apache.jetspeed.security.GroupPrincipal)

getGroupPrincipals

public List getGroupPrincipals(String filter)
Description copied from interface: GroupSecurityHandler

Gets the an iterator of group principals for a given filter.

Specified by:
getGroupPrincipals in interface GroupSecurityHandler
Parameters:
filter - The filter.
Returns:
The list of Principal
See Also:
GroupSecurityHandler.getGroupPrincipals(java.lang.String)


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