public class JPAUsersRepository extends AbstractUsersRepository
| Constructor and Description | 
|---|
JPAUsersRepository()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
contains(String name)
Returns whether or not this user is in the repository 
 | 
int | 
countUsers()
Returns a count of the users in the repository. 
 | 
protected void | 
doAddUser(String username,
         String password)
Add the user with the given username and password 
 | 
void | 
doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)  | 
String | 
getRealName(String name)
Returns the user name of the user matching name on an equalsIgnoreCase
 basis. 
 | 
User | 
getUserByName(String name)
Get the user object with the specified user name. 
 | 
void | 
init()  | 
Iterator<String> | 
list()
List users in repository. 
 | 
void | 
removeUser(String name)
Removes a user from the repository 
 | 
void | 
setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
Sets entity manager. 
 | 
boolean | 
test(String name,
    String password)
Test if user with name 'name' has password 'password'. 
 | 
void | 
updateUser(User user)
Update the repository with the specified user object. 
 | 
addUser, configure, getLogger, isValidUsername, setDomainList, setEnableVirtualHosting, setLog, supportVirtualHostingpublic final void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
entityManagerFactory - the entityManager to set@PostConstruct public void init()
public User getUserByName(String name) throws UsersRepositoryException
name - the name of the user to retrieveUsersRepositoryException - if errorpublic String getRealName(String name) throws UsersRepositoryException
name - the name to case-correctUsersRepositoryExceptionpublic void updateUser(User user) throws UsersRepositoryException
UsersRepositoryExceptionpublic void removeUser(String name) throws UsersRepositoryException
name - the user to remove from the repositoryUsersRepositoryExceptionpublic boolean contains(String name) throws UsersRepositoryException
name - the name to check in the repositoryUsersRepositoryExceptionpublic boolean test(String name, String password) throws UsersRepositoryException
name - the name of the user to be testedpassword - the password to be testedUsersRepositoryException - if errorpublic int countUsers()
               throws UsersRepositoryException
UsersRepositoryExceptionpublic Iterator<String> list() throws UsersRepositoryException
UsersRepositoryExceptionpublic void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
                 throws org.apache.commons.configuration.ConfigurationException
doConfigure in class AbstractUsersRepositoryorg.apache.commons.configuration.ConfigurationExceptionAbstractUsersRepository.doConfigure(org.apache.commons.configuration.HierarchicalConfiguration)protected void doAddUser(String username, String password) throws UsersRepositoryException
AbstractUsersRepositorydoAddUser in class AbstractUsersRepositoryUsersRepositoryException - If an error occurredAbstractUsersRepository.doAddUser(java.lang.String, java.lang.String)Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.