| org.sakaiproject.user.api.UserDirectoryService
All known Subclasses: org.sakaiproject.user.impl.BaseUserDirectoryService,
UserDirectoryService | public interface UserDirectoryService extends EntityProducer(Code) | |
UserDirectoryService manages the end-user modeling for Sakai.
|
Method Summary | |
UserEdit | addUser(String id, String eid) Add a new user to the directory. | User | addUser(String id, String eid, String firstName, String lastName, String email, String pw, String type, ResourceProperties properties) Add a new user to the directory, complete in one operation. | boolean | allowAddUser() check permissions for addUser(). | boolean | allowRemoveUser(String id) check permissions for removeUser().
Parameters: id - The group id. | boolean | allowUpdateUser(String id) check permissions for editUser()
Parameters: id - The user id. | public boolean | allowUpdateUserEmail(String id) check permissions for editUser()
Parameters: id - The user id. | public boolean | allowUpdateUserName(String id) check permissions for editUser()
Parameters: id - The user id. | public boolean | allowUpdateUserPassword(String id) check permissions for editUser()
Parameters: id - The user id. | public boolean | allowUpdateUserType(String id) check permissions for editUser()
Parameters: id - The user id. | User | authenticate(String eid, String password) Authenticate a user / password.
Parameters: eid - The user eid. Parameters: password - The password. | void | cancelEdit(UserEdit user) Cancel the changes made to a UserEdit object, and release the lock. | void | commitEdit(UserEdit user) Commit the changes made to a UserEdit object, and release the lock. | int | countSearchUsers(String criteria) Count all the users that match this criteria in id or target, first or last name. | int | countUsers() Count all the users. | void | destroyAuthentication() Remove authentication for the current user. | UserEdit | editUser(String id) Get a locked user object for editing. | Collection | findUsersByEmail(String email) Find the user objects which have this email address.
Parameters: email - The email address string. | User | getAnonymousUser() Access the anonymous user object. | User | getCurrentUser() Access the user object associated with the "current" request. | User | getUser(String id) Access a user object.
Parameters: id - The user id string. | User | getUserByEid(String eid) Access a user object, given an enterprise id.
Parameters: eid - The user eid string. | String | getUserEid(String id) Find the user eid from a user id.
Parameters: id - The user id. | String | getUserId(String eid) Find the user id from a user eid.
Parameters: eid - The user eid. | List | getUsers() Access all user objects - known to us (not from external providers). | List | getUsers(Collection ids) Access a bunch of user object.
Parameters: ids - The Collection (String) of user ids. | List | getUsers(int first, int last) Find all the users within the record range given (sorted by sort name).
Parameters: first - The first record position to return. Parameters: last - The last record position to return. | UserEdit | mergeUser(Element el) Add a new user to the directory, from a definition in XML. | void | removeUser(UserEdit user) Remove this user's information from the directory - it must be a user with a lock from editUser(). | List | searchUsers(String criteria, int first, int last) Search all the users that match this criteria in id or email, first or last name, returning a subset of records within the record range given (sorted by sort name).
Parameters: criteria - The search criteria. Parameters: first - The first record position to return. Parameters: last - The last record position to return. | String | userReference(String id) Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The user id string. |
ADMIN_EID | final static String ADMIN_EID(Code) | | User eid for the admin user.
|
ADMIN_ID | final static String ADMIN_ID(Code) | | User id for the admin user.
|
APPLICATION_ID | final static String APPLICATION_ID(Code) | | The type string for this application: should not change over time as it may be stored in various parts of persistent entities.
|
REFERENCE_ROOT | final static String REFERENCE_ROOT(Code) | | This string starts the references to resources in this service.
|
SECURE_ADD_USER | final static String SECURE_ADD_USER(Code) | | Name for the event of adding a group.
|
SECURE_REMOVE_USER | final static String SECURE_REMOVE_USER(Code) | | Name for the event of removing a user.
|
SECURE_UPDATE_USER_ANY | final static String SECURE_UPDATE_USER_ANY(Code) | | Name for the event of updating any user info.
|
SECURE_UPDATE_USER_OWN | final static String SECURE_UPDATE_USER_OWN(Code) | | Name for the event of updating one's own user info.
|
SECURE_UPDATE_USER_OWN_EMAIL | final static String SECURE_UPDATE_USER_OWN_EMAIL(Code) | | Name for the ability for updating one's own email.
|
SECURE_UPDATE_USER_OWN_NAME | final static String SECURE_UPDATE_USER_OWN_NAME(Code) | | Name for the ability for updating one's own name.
|
SECURE_UPDATE_USER_OWN_PASSWORD | final static String SECURE_UPDATE_USER_OWN_PASSWORD(Code) | | Name for the ability for updating one's own password.
|
SECURE_UPDATE_USER_OWN_TYPE | final static String SECURE_UPDATE_USER_OWN_TYPE(Code) | | Name for the ability for updating one's own type.
|
addUser | User addUser(String id, String eid, String firstName, String lastName, String email, String pw, String type, ResourceProperties properties) throws UserIdInvalidException, UserAlreadyDefinedException, UserPermissionException(Code) | | Add a new user to the directory, complete in one operation. Id is auto-generated.
Parameters: id - The user uuid string. Leave null for auto-assignment. Parameters: eid - The user eid. Parameters: firstName - The user first name. Parameters: lastName - The user last name. Parameters: email - The user email. Parameters: pw - The user password. Parameters: type - The user type. Parameters: properties - Other user properties. The User object created. exception: UserIdInvalidException - if the user eid is invalid. exception: UserAlreadyDefinedException - if the user eid is already used. exception: UserPermissionException - if the current user does not have permission to add a user. |
allowAddUser | boolean allowAddUser()(Code) | | check permissions for addUser().
true if the user is allowed to add a user, false if not. |
allowRemoveUser | boolean allowRemoveUser(String id)(Code) | | check permissions for removeUser().
Parameters: id - The group id. true if the user is allowed to removeUser(id), false if not. |
allowUpdateUser | boolean allowUpdateUser(String id)(Code) | | check permissions for editUser()
Parameters: id - The user id. true if the user is allowed to update the user, false if not. |
allowUpdateUserEmail | public boolean allowUpdateUserEmail(String id)(Code) | | check permissions for editUser()
Parameters: id - The user id. true if the user is allowed to update their own email address, false if not. |
allowUpdateUserName | public boolean allowUpdateUserName(String id)(Code) | | check permissions for editUser()
Parameters: id - The user id. true if the user is allowed to update their own first and last names, false if not. |
allowUpdateUserPassword | public boolean allowUpdateUserPassword(String id)(Code) | | check permissions for editUser()
Parameters: id - The user id. true if the user is allowed to update their own password, false if not. |
allowUpdateUserType | public boolean allowUpdateUserType(String id)(Code) | | check permissions for editUser()
Parameters: id - The user id. true if the user is allowed to update their own type, false if not. |
authenticate | User authenticate(String eid, String password)(Code) | | Authenticate a user / password.
Parameters: eid - The user eid. Parameters: password - The password. The User object of the authenticated user if successfull, null if not. |
cancelEdit | void cancelEdit(UserEdit user)(Code) | | Cancel the changes made to a UserEdit object, and release the lock. The UserEdit is disabled, and not to be used after this call.
Parameters: user - The UserEdit object to commit. |
commitEdit | void commitEdit(UserEdit user) throws UserAlreadyDefinedException(Code) | | Commit the changes made to a UserEdit object, and release the lock. The UserEdit is disabled, and not to be used after this call.
Parameters: user - The UserEdit object to commit. exception: UserAlreadyDefinedException - if the User eid is already in use by another User object. |
countSearchUsers | int countSearchUsers(String criteria)(Code) | | Count all the users that match this criteria in id or target, first or last name.
The count of all users matching the criteria. |
countUsers | int countUsers()(Code) | | Count all the users.
The count of all users. |
destroyAuthentication | void destroyAuthentication()(Code) | | Remove authentication for the current user.
|
findUsersByEmail | Collection findUsersByEmail(String email)(Code) | | Find the user objects which have this email address.
Parameters: email - The email address string. A Collection (User) of user objects which have this email address (may be empty). |
getAnonymousUser | User getAnonymousUser()(Code) | | Access the anonymous user object.
the anonymous user object. |
getCurrentUser | User getCurrentUser()(Code) | | Access the user object associated with the "current" request.
The current user (may be anon). |
getUsers | List getUsers()(Code) | | Access all user objects - known to us (not from external providers).
A list of user objects containing each user's information. exception: IdUnusedException - if not found. |
getUsers | List getUsers(Collection ids)(Code) | | Access a bunch of user object.
Parameters: ids - The Collection (String) of user ids. A List (User) of user objects for valid ids. |
getUsers | List getUsers(int first, int last)(Code) | | Find all the users within the record range given (sorted by sort name).
Parameters: first - The first record position to return. Parameters: last - The last record position to return. A list (User) of all the users within the record range given (sorted by sort name). |
removeUser | void removeUser(UserEdit user) throws UserPermissionException(Code) | | Remove this user's information from the directory - it must be a user with a lock from editUser(). The UserEdit is disabled, and not to be used after this call.
Parameters: user - The locked user object to remove. exception: UserPermissionException - if the current user does not have permission to remove this user. |
searchUsers | List searchUsers(String criteria, int first, int last)(Code) | | Search all the users that match this criteria in id or email, first or last name, returning a subset of records within the record range given (sorted by sort name).
Parameters: criteria - The search criteria. Parameters: first - The first record position to return. Parameters: last - The last record position to return. A list (User) of all the aliases matching the criteria, within the record range given (sorted by sort name). |
userReference | String userReference(String id)(Code) | | Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The user id string. The the internal reference which can be used to access the resource from within the system. |
|
|