toolbox.services.ldap.simple
Interface SimpleGroupService

Package class diagram package SimpleGroupService
All Known Implementing Classes:
SimpleGroupServiceImpl

public interface SimpleGroupService

Interface that defines a simple LDAP group provisioning interface.


Method Summary
 void addGroup(SimpleGroup group)
          Add a group to the directory.
 void addMember(java.lang.String cn, SimpleUser user)
          Add the given user to the named group.
 java.util.List findGroups(SimpleGroup params)
          Find groups in the directory making use of populated properties in the given SimpleGroup instance.
 SimpleGroup getGroup(java.lang.String cn)
          Return a single group entry from the directory.
 void removeGroup(java.lang.String cn)
          Remove a group from the directory.
 void removeMember(java.lang.String cn, SimpleUser user)
          Remove the given user from the named group.
 void updateGroup(SimpleGroup group)
          Update the named group.
 

Method Detail

addGroup

void addGroup(SimpleGroup group)
              throws SimpleGroupException
Add a group to the directory.

Parameters:
group - SimpleGroup instance to add to the directory.
Throws:
SimpleGroupException - if the user cannot be added.

getGroup

SimpleGroup getGroup(java.lang.String cn)
                     throws SimpleGroupException
Return a single group entry from the directory.

Parameters:
cn - Strinb containing the common name of the group to return.
Returns:
SimpleGroup instance.
Throws:
SimpleGroupException - if the group cannot be returned.

addMember

void addMember(java.lang.String cn,
               SimpleUser user)
               throws SimpleGroupException
Add the given user to the named group.

Parameters:
cn - String containing the name of the group to modify.
user - SimpleUser instance to add to the group.
Throws:
SimpleGroupException

removeMember

void removeMember(java.lang.String cn,
                  SimpleUser user)
                  throws SimpleGroupException
Remove the given user from the named group.

Parameters:
cn - String containing the name of the group to modify.
user - SimpleUser instance to remove from the group.
Throws:
SimpleGroupException

removeGroup

void removeGroup(java.lang.String cn)
                 throws SimpleGroupException
Remove a group from the directory.

Parameters:
cn - String containing the common name of the group to remove.
Throws:
SimpleGroupException - if the group cannot be removed.

updateGroup

void updateGroup(SimpleGroup group)
                 throws SimpleGroupException
Update the named group.

Parameters:
group - SimpleGroup that must be updated.
Throws:
SimpleGroupException - if the group cannot be updated.

findGroups

java.util.List findGroups(SimpleGroup params)
                          throws SimpleGroupException
Find groups in the directory making use of populated properties in the given SimpleGroup instance.

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