|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.UserManagerAdapter
com.jivesoftware.base.database.DbUserManager
public class DbUserManager
Database implementation of the UserManager interface. It uses the DbUser class along with the jiveUser database table to store and manipulate user information.
This UserManager implementation uses two global caches to vastly improve speed:
If making your own UserManager implementation, it's highly recommended that you also use these caches.
| Field Summary | |
|---|---|
static Cache |
userEmailCache
|
| Constructor Summary | |
|---|---|
DbUserManager()
|
|
| Method Summary | |
|---|---|
User |
createUser(long id,
java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String email,
boolean nameVisible,
boolean emailVisible,
java.util.Map properties)
This method is only designed to be used for mass importing users via the xml export/import utility. |
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 properties)
Factory method for creating a new User with all required AND optional values. |
void |
deleteUser(User user)
Deletes a user. |
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. |
java.util.Iterator |
getUsersFromEmailAddress(java.lang.String email)
Returns an iterator of user objects corresponding to the email address given. |
boolean |
isCreateUserSupported()
Indicates whether user creation (createUser(String username, String password, String email)) is supported. |
boolean |
isDeleteUserSupported()
Indicates whether user deletion (deleteUser(User user)) is supported. |
boolean |
isGetUserCountSupported()
Indicates whether getting a count of all users (getUserCount()) is supported. |
boolean |
isGetUserFromEmailAddressSupported()
Indicates whether retrieving a user for an email address (getUserFromEmailAddress(String emailAddr)) is supported. |
boolean |
isUserListSupported()
Indicates whether getting an Iterator of all users (users()) is supported. |
protected User |
lookupUser(long userID)
Returns a User with a given user ID. |
protected User |
lookupUser(java.lang.String username)
Returns a User with a given username. |
java.util.Iterator |
users()
Returns an iterator for all users in the system. |
java.util.Iterator |
users(int startIndex,
int numResults)
Returns an iterator for all users starting at startIndex with the given number of results. |
| Methods inherited from class com.jivesoftware.base.UserManagerAdapter |
|---|
getUser, getUser, getUserID, isReadOnly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Cache userEmailCache
| Constructor Detail |
|---|
public DbUserManager()
| Method Detail |
|---|
public User createUser(java.lang.String username,
java.lang.String password,
java.lang.String email)
throws UserAlreadyExistsException
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
createUser in interface UserManagercreateUser in class UserManagerAdapterusername - 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.
public 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 properties)
throws UserAlreadyExistsException
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
createUser in interface UserManagercreateUser in class UserManagerAdapterusername - 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.
public User createUser(long id,
java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String email,
boolean nameVisible,
boolean emailVisible,
java.util.Map properties)
throws UserAlreadyExistsException
UserAlreadyExistsException
protected User lookupUser(long userID)
throws UserNotFoundException
UserManagerAdapter
lookupUser in class UserManagerAdapterUserNotFoundException
protected User lookupUser(java.lang.String username)
throws UserNotFoundException
UserManagerAdapter
lookupUser in class UserManagerAdapterUserNotFoundException
public void deleteUser(User user)
throws UnauthorizedException
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
deleteUser in interface UserManagerdeleteUser in class UserManagerAdapteruser - the user to delete.
UnauthorizedExceptionpublic int getUserCount()
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
getUserCount in interface UserManagergetUserCount in class UserManagerAdapterpublic java.util.Iterator users()
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
users in interface UserManagerusers in class UserManagerAdapter
public java.util.Iterator users(int startIndex,
int numResults)
UserManagerIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
users in interface UserManagerusers in class UserManagerAdapterstartIndex - the beginning index to start the results at.numResults - the total number of results to return.
public User getUserFromEmailAddress(java.lang.String email)
AdvancedUserManager
getUserFromEmailAddress in interface AdvancedUserManageremail - the email address to get a user object for.
public java.util.Iterator getUsersFromEmailAddress(java.lang.String email)
AdvancedUserManager
getUsersFromEmailAddress in interface AdvancedUserManageremail - the email address to get a user object for.
public boolean isCreateUserSupported()
IntrospectiveUserManager
isCreateUserSupported in interface IntrospectiveUserManagerisCreateUserSupported in class UserManagerAdapterpublic boolean isDeleteUserSupported()
IntrospectiveUserManager
isDeleteUserSupported in interface IntrospectiveUserManagerisDeleteUserSupported in class UserManagerAdapterpublic boolean isGetUserCountSupported()
IntrospectiveUserManager
isGetUserCountSupported in interface IntrospectiveUserManagerisGetUserCountSupported in class UserManagerAdapterpublic boolean isUserListSupported()
IntrospectiveUserManager
isUserListSupported in interface IntrospectiveUserManagerisUserListSupported in class UserManagerAdapterpublic boolean isGetUserFromEmailAddressSupported()
IntrospectiveUserManager
isGetUserFromEmailAddressSupported in interface IntrospectiveUserManagerisGetUserFromEmailAddressSupported in class UserManagerAdapter
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||