|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserManager
Centralized management of users in the Jive system including creating, retrieving, and deleting User objects.
Instructions for those that wish to implement this interface to provide a custom implementation appear in red. If you wish to use a custom implementation, you must set the Jive property UserManager.className with the name of your UserManager class. Your class must have a public, no-argument constructor. The class must also create and return User object implementations as necessary.
User| Method Summary | |
|---|---|
boolean |
authenticate(java.lang.String username,
java.lang.String password)
|
User |
createUser(java.lang.String username,
java.lang.String password,
java.lang.String email)
Factory method for creating a new User with all required values: a password, email address, and unique username. |
User |
createUser(java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String email,
boolean nameVisible,
boolean emailVisible,
java.util.Map<java.lang.String,java.lang.String> properties)
Factory method for creating a new User with all required AND optional values. |
void |
deleteUser(User user)
Deletes a user. |
int |
getEnabledUserCount()
|
User |
getUser(long userID)
Returns a User specified by their ID. |
User |
getUser(java.lang.String username)
Returns the User specified by username. |
int |
getUserCount()
Returns the number of users in the system. |
User |
getUserFromEmailAddress(java.lang.String email)
Returns a user object corresponding to the email address given. |
long |
getUserID(java.lang.String username)
Returns the userID specified by the username. |
java.lang.Iterable<User> |
users()
Returns an iterator for all users in the system. |
java.lang.Iterable<User> |
users(int startIndex,
int numResults)
Returns an iterator for all users starting at startIndex with the given number of results. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
User createUser(java.lang.String username,
java.lang.String password,
java.lang.String email)
throws UserAlreadyExistsException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
username - the new and unique username for the account.password - the password for the account as plain text.email - the email address for the account.
UserAlreadyExistsException - if the username already exists in the system.
User createUser(java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String email,
boolean nameVisible,
boolean emailVisible,
java.util.Map<java.lang.String,java.lang.String> properties)
throws UserAlreadyExistsException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
username - the new and unique username for the account.password - the password for the account as plain text.name - the name for the account.email - the email address for the account.nameVisible - true if the user's name should be visible to others.emailVisible - true if the user's email address should be visible to others.properties - the user's extended properties.
UserAlreadyExistsException - if the username already exists in the system.
User getUser(long userID)
throws UserNotFoundException
Because this method will be called often by other parts of the API,
a cache of User objects should be used. UserManagerFactory.userCache can be
used for this purpose. The algorithm should be:
userID - the id of the User to lookup.
UserNotFoundException - if the user does not exist.
User getUser(java.lang.String username)
throws UserNotFoundException
The method should typically be implemented as:
return getUser(getUserID(username));
username - the username of the user.
UserNotFoundException - if the user does not exist.
long getUserID(java.lang.String username)
throws UserNotFoundException
Because this method will be called often by other parts of the API,
a cache should be used that maps usernames to userIDs. UserManagerFactory.userIDCache
can be used for this purpose. The algorithm should be:
username - the username of the usedr.
UserNotFoundException - if the user does not exist.
void deleteUser(User user)
throws UnauthorizedException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
user - the user to delete.
UnauthorizedException - if not an administratorint getUserCount()
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
java.lang.Iterable<User> users()
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
java.lang.Iterable<User> users(int startIndex,
int numResults)
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
startIndex - the beginning index to start the results at.numResults - the total number of results to return.
User getUserFromEmailAddress(java.lang.String email)
email - the email address to get a user object for.
int getEnabledUserCount()
boolean authenticate(java.lang.String username,
java.lang.String password)
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||