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

java.lang.Object
  extended by org.apache.jetspeed.security.spi.impl.LdapUserSecurityHandler
All Implemented Interfaces:
UserSecurityHandler

public class LdapUserSecurityHandler
extends java.lang.Object
implements UserSecurityHandler

Author:
Mike Long
See Also:
UserSecurityHandler

Constructor Summary
LdapUserSecurityHandler()
           Default constructor.
LdapUserSecurityHandler(LdapPrincipalDao ldap)
           
 
Method Summary
 void addUserPrincipal(UserPrincipal userPrincipal)
           Adds a new user principal in the backing store.
 java.security.Principal getUserPrincipal(java.lang.String uid)
           Gets the user principal for the given user name.
 java.util.List getUserPrincipals(java.lang.String filter)
           Gets the an iterator of user principals for a given filter.
 boolean isUserPrincipal(java.lang.String uid)
           Lookup the user by his UID attribute on the Ldap Server.
 void removeUserPrincipal(UserPrincipal userPrincipal)
           Removes the user principal.
 void updateUserPrincipal(UserPrincipal userPrincipal)
           Updates the user principal in the backing store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapUserSecurityHandler

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

LdapUserSecurityHandler

public LdapUserSecurityHandler()
                        throws javax.naming.NamingException,
                               SecurityException

Default constructor.

Throws:
javax.naming.NamingException
SecurityException
Method Detail

isUserPrincipal

public boolean isUserPrincipal(java.lang.String uid)

Lookup the user by his UID attribute on the Ldap Server.

Specified by:
isUserPrincipal in interface UserSecurityHandler
Returns:
true if the Ldap Server finds a user with that UID; false if he is not found or some sort of NamingException occurred.
See Also:
UserSecurityHandler.isUserPrincipal(java.lang.String)

getUserPrincipal

public java.security.Principal getUserPrincipal(java.lang.String uid)
Description copied from interface: UserSecurityHandler

Gets the user principal for the given user name.

Specified by:
getUserPrincipal in interface UserSecurityHandler
Parameters:
uid - The user name.
Returns:
The Principal

See Also:
UserSecurityHandler.getUserPrincipal(java.lang.String)

getUserPrincipals

public java.util.List getUserPrincipals(java.lang.String filter)
Description copied from interface: UserSecurityHandler

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

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

addUserPrincipal

public void addUserPrincipal(UserPrincipal userPrincipal)
                      throws SecurityException
Description copied from interface: UserSecurityHandler

Adds a new user principal in the backing store.

Specified by:
addUserPrincipal in interface UserSecurityHandler
Parameters:
userPrincipal - The new UserPrincipal.
Throws:
SecurityException - Throws a SecurityException.
See Also:
UserSecurityHandler.addUserPrincipal(org.apache.jetspeed.security.UserPrincipal)

updateUserPrincipal

public void updateUserPrincipal(UserPrincipal userPrincipal)
                         throws SecurityException
Description copied from interface: UserSecurityHandler

Updates the user principal in the backing store.

Specified by:
updateUserPrincipal in interface UserSecurityHandler
Parameters:
userPrincipal - The UserPrincipal.
Throws:
SecurityException - Throws a SecurityException.
See Also:
UserSecurityHandler.updateUserPrincipal(org.apache.jetspeed.security.UserPrincipal)

removeUserPrincipal

public void removeUserPrincipal(UserPrincipal userPrincipal)
                         throws SecurityException
Description copied from interface: UserSecurityHandler

Removes the user principal.

Specified by:
removeUserPrincipal in interface UserSecurityHandler
Parameters:
userPrincipal - The UserPrincipal.
Throws:
SecurityException - Throws a SecurityException.
See Also:
UserSecurityHandler.removeUserPrincipal(org.apache.jetspeed.security.UserPrincipal)


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