org.sakaiproject.service.legacy.user
Interface UserDirectoryProvider

All Known Implementing Classes:
IMSEntUserDirectoryProvider, KerberosUserDirectoryProvider, SampleUserDirectoryProvider

public interface UserDirectoryProvider

UserDirectoryProvider is the Interface for CHEF user directory information providers. These are used by a user directory service to access external user information.

Version:
$Revision: 3195 $
Author:
University of Michigan, CHEF Software Development Team

Method Summary
 boolean authenticateUser(String id, UserEdit edit, String password)
          Authenticate a user / password.
 boolean authenticateWithProviderFirst(String id)
          Whether to check provider or internal data first when authenticating a user
 boolean createUserRecord(String id)
          If user record cannot be found in by UserDirectoryService, can the service create the user record?
 void destroyAuthentication()
          Remove any authentication traces for the current user / request
 boolean findUserByEmail(UserEdit edit, String email)
          Find a user object who has this email address.
 boolean getUser(UserEdit edit)
          Access a user object.
 void getUsers(Collection users)
          Access a collection of UserEdit objects; if the user is found, update the information, otherwise remove the UserEdit object from the collection.
 boolean updateUserAfterAuthentication()
          Will this provider update user records on successfull authentication?
 boolean userExists(String id)
          See if a user by this id is known to the provider.
 

Method Detail

authenticateUser

public boolean authenticateUser(String id,
                                UserEdit edit,
                                String password)
Authenticate a user / password. If the user edit exists it may be modified, and will be stored if...

Parameters:
id - The user id.
edit - The UserEdit matching the id to be authenticated (and updated) if we have one.
password - The password.
Returns:
true if authenticated, false if not.

updateUserAfterAuthentication

public boolean updateUserAfterAuthentication()
Will this provider update user records on successfull authentication? If so, the UserDirectoryService will cause these updates to be stored.

Returns:
true if the user record may be updated after successfull authentication, false if not.

destroyAuthentication

public void destroyAuthentication()
Remove any authentication traces for the current user / request


userExists

public boolean userExists(String id)
See if a user by this id is known to the provider.

Parameters:
id - The user id string.
Returns:
true if a user by this id exists, false if not.

getUser

public boolean getUser(UserEdit edit)
Access a user object. Update the object with the information found.

Parameters:
edit - The user object (id is set) to fill in.
Returns:
true if the user object was found and information updated, false if not.

getUsers

public void getUsers(Collection users)
Access a collection of UserEdit objects; if the user is found, update the information, otherwise remove the UserEdit object from the collection.

Parameters:
users - The UserEdit objects (with id set) to fill in or remove.

findUserByEmail

public boolean findUserByEmail(UserEdit edit,
                               String email)
Find a user object who has this email address. Update the object with the information found.

Parameters:
email - The email address string.
Returns:
true if the user object was found and information updated, false if not.

authenticateWithProviderFirst

public boolean authenticateWithProviderFirst(String id)
Whether to check provider or internal data first when authenticating a user

Returns:
true if provider data is checked first, false if otherwise

createUserRecord

public boolean createUserRecord(String id)
If user record cannot be found in by UserDirectoryService, can the service create the user record?