|
Jive Forums API (5.5.20.2-oracle) 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
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
createUser
in interface UserManager
createUser
in class UserManagerAdapter
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.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
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
createUser
in interface UserManager
createUser
in class UserManagerAdapter
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.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 UserManagerAdapter
UserNotFoundException
protected User lookupUser(java.lang.String username) throws UserNotFoundException
UserManagerAdapter
lookupUser
in class UserManagerAdapter
UserNotFoundException
public void deleteUser(User user) throws UnauthorizedException
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
deleteUser
in interface UserManager
deleteUser
in class UserManagerAdapter
user
- the user to delete.
UnauthorizedException
public int getUserCount()
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
getUserCount
in interface UserManager
getUserCount
in class UserManagerAdapter
public java.util.Iterator users()
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
users
in interface UserManager
users
in class UserManagerAdapter
public java.util.Iterator users(int startIndex, int numResults)
UserManager
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
users
in interface UserManager
users
in class UserManagerAdapter
startIndex
- 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 AdvancedUserManager
email
- the email address to get a user object for.
public java.util.Iterator getUsersFromEmailAddress(java.lang.String email)
AdvancedUserManager
getUsersFromEmailAddress
in interface AdvancedUserManager
email
- the email address to get a user object for.
public boolean isCreateUserSupported()
IntrospectiveUserManager
isCreateUserSupported
in interface IntrospectiveUserManager
isCreateUserSupported
in class UserManagerAdapter
public boolean isDeleteUserSupported()
IntrospectiveUserManager
isDeleteUserSupported
in interface IntrospectiveUserManager
isDeleteUserSupported
in class UserManagerAdapter
public boolean isGetUserCountSupported()
IntrospectiveUserManager
isGetUserCountSupported
in interface IntrospectiveUserManager
isGetUserCountSupported
in class UserManagerAdapter
public boolean isUserListSupported()
IntrospectiveUserManager
isUserListSupported
in interface IntrospectiveUserManager
isUserListSupported
in class UserManagerAdapter
public boolean isGetUserFromEmailAddressSupported()
IntrospectiveUserManager
isGetUserFromEmailAddressSupported
in interface IntrospectiveUserManager
isGetUserFromEmailAddressSupported
in class UserManagerAdapter
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |