public class SampleUserDirectoryProvider extends Object implements UserDirectoryProvider, UsersShareEmailUDP, DisplayAdvisorUDP, ExternalUserSearchUDP
SampleUserDirectoryProvider is a samaple UserDirectoryProvider.
| Modifier and Type | Class and Description |
|---|---|
protected class |
SampleUserDirectoryProvider.Info |
| Modifier and Type | Field and Description |
|---|---|
static String |
EMAIL_DOMAIN |
protected ValueEncryptionUtilities |
encryptionUtilities |
protected int |
m_courseStudents
how many students to recognize (1.. this).
|
protected Hashtable<String,SampleUserDirectoryProvider.Info> |
m_info
A collection of user ids/names.
|
| Constructor and Description |
|---|
SampleUserDirectoryProvider()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticateUser(String userId,
UserEdit edit,
String password)
Authenticate a user / password.
|
boolean |
authenticateWithProviderFirst(String id) |
boolean |
createUserRecord(String id) |
void |
destroy()
Returns to uninitialized state.
|
boolean |
findUserByEmail(UserEdit edit,
String email)
Find a user object who has this email address.
|
Collection<UserEdit> |
findUsersByEmail(String email,
UserFactory factory)
Find all user objects which have this email address.
|
String |
getDisplayId(User user) |
String |
getDisplayName(User user) |
boolean |
getUser(UserEdit edit)
Access a user object.
|
void |
getUsers(Collection<UserEdit> users)
Access a collection of UserEdit objects; if the user is found, update the information, otherwise remove the UserEdit object from the collection.
|
void |
init()
Final initialization, once all dependencies are set.
|
List<UserEdit> |
searchExternalUsers(String criteria,
int first,
int last,
UserFactory factory) |
void |
setCourseStudents(String count)
Set how many students to recognize.
|
void |
setValueEncryptionUtilities(ValueEncryptionUtilities encryptionUtilities) |
protected boolean |
userExists(String userId)
See if a user by this id exists.
|
public static final String EMAIL_DOMAIN
protected int m_courseStudents
protected ValueEncryptionUtilities encryptionUtilities
protected Hashtable<String,SampleUserDirectoryProvider.Info> m_info
public void setCourseStudents(String count)
count - How many students to recognize.public void setValueEncryptionUtilities(ValueEncryptionUtilities encryptionUtilities)
public void init()
public void destroy()
protected boolean userExists(String userId)
userId - The user id string.public boolean getUser(UserEdit edit)
getUser in interface UserDirectoryProvideredit - The user object (id is set) to fill in.public void getUsers(Collection<UserEdit> users)
getUsers in interface UserDirectoryProviderusers - The UserEdit objects (with id set) to fill in or remove.public boolean findUserByEmail(UserEdit edit, String email)
findUserByEmail in interface UserDirectoryProvideremail - The email address string.public Collection<UserEdit> findUsersByEmail(String email, UserFactory factory)
findUsersByEmail in interface UsersShareEmailUDPemail - The email address string.factory - Use this factory's newUser() method to create all the UserEdit objects you populate and return in the return collection.public List<UserEdit> searchExternalUsers(String criteria, int first, int last, UserFactory factory)
searchExternalUsers in interface ExternalUserSearchUDPpublic boolean authenticateUser(String userId, UserEdit edit, String password)
authenticateUser in interface UserDirectoryProviderid - The user id.edit - The UserEdit matching the id to be authenticated (and updated) if we have one.password - The password.public boolean authenticateWithProviderFirst(String id)
authenticateWithProviderFirst in interface UserDirectoryProviderpublic boolean createUserRecord(String id)
public String getDisplayId(User user)
getDisplayId in interface DisplayAdvisorUDPpublic String getDisplayName(User user)
getDisplayName in interface DisplayAdvisorUDPCopyright © 2003–2021 Sakai Project. All rights reserved.