toolbox.services.ldap.simple
Interface SimpleUserService

Package class diagram package SimpleUserService
All Known Implementing Classes:
SimpleUserServiceImpl

public interface SimpleUserService

Interface that defines a simple LDAP user provisioning interface.


Method Summary
 void addUser(SimpleUser user)
          Add a user to the directory.
 void bind(java.lang.String uid, java.lang.String password)
          Perform a bind using the provided uid and password values.
 java.util.List findUsers(SimpleUser params)
          Find users in the directory making use of populate properties in the given SimpleUser instance.
 java.util.List getGroupNames(java.lang.String uid)
          Return a List of the group names that the given uid belongs to.
 SimpleUser getUser(java.lang.String uid)
          Return a single user entry from the directory.
 SimpleUser getUserByDn(java.lang.String dn)
          Return a single user entry from the directory using the DN value.
 void removeUser(java.lang.String uid)
          Remove a user from the directory.
 void updateUser(SimpleUser user)
          Update a user in the directory.
 

Method Detail

addUser

void addUser(SimpleUser user)
             throws SimpleUserException
Add a user to the directory.

Parameters:
user - SimpleUser instance to add to the directory.
Throws:
SimpleUserException - if the user cannot be added.

updateUser

void updateUser(SimpleUser user)
                throws SimpleUserException
Update a user in the directory.

Parameters:
user - SimpleUser instance to update in the directory.
Throws:
SimpleUserException - if the the user cannot be updated.

getUser

SimpleUser getUser(java.lang.String uid)
                   throws SimpleUserException
Return a single user entry from the directory.

Parameters:
uid - String containing the uid of the user to return.
Returns:
SimpleUser instance.
Throws:
SimpleUserException - if the user cannot be returned.

getUserByDn

SimpleUser getUserByDn(java.lang.String dn)
                       throws SimpleUserException
Return a single user entry from the directory using the DN value.

Parameters:
dn - String containing the dn of the user to return.
Returns:
SimpleUser instance.
Throws:
SimpleUserException - if the user cannot be returned.

removeUser

void removeUser(java.lang.String uid)
                throws SimpleUserException
Remove a user from the directory.

Parameters:
uid - String containing the uid of the user to remove.
Throws:
SimpleUserException - if the user cannot be removed.

findUsers

java.util.List findUsers(SimpleUser params)
                         throws SimpleUserException
Find users in the directory making use of populate properties in the given SimpleUser instance.

Parameters:
params - SimpleUser instance containing the properties to search on.
Returns:
List containing SimpleUser instances.
Throws:
SimpleUserException - if the search cannot be performed.

getGroupNames

java.util.List getGroupNames(java.lang.String uid)
                             throws SimpleUserException
Return a List of the group names that the given uid belongs to.

Parameters:
uid - String containing the uid to use in the group search.
Returns:
List containing the group names.
Throws:
SimpleUserException

bind

void bind(java.lang.String uid,
          java.lang.String password)
          throws SimpleUserException
Perform a bind using the provided uid and password values. This is useful to perform simple authentication.

Parameters:
uid - String containing uid that must be used during the bind.
password - String containing the password to use.
Throws:
java.lang.Exception - if the bind is unsuccessful.
SimpleUserException