public class JCRUsersRepository extends AbstractUsersRepository
UsersRepository
implementation which stores users to a JCR
Repository
Constructor and Description |
---|
JCRUsersRepository() |
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 username)
Get the user object with the specified user name.
|
Iterator<String> |
list()
List users in repository.
|
void |
removeUser(String username)
Removes a user from the repository
|
void |
setRepository(javax.jcr.Repository repository) |
boolean |
test(String username,
String password)
Test if user with name 'name' has password 'password'.
|
protected String |
toSafeName(String key) |
void |
updateUser(User user)
Update the repository with the specified user object.
|
addUser, configure, getLogger, isValidUsername, setDomainList, setEnableVirtualHosting, setLog, supportVirtualHosting
public void setRepository(javax.jcr.Repository repository)
public void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config) throws org.apache.commons.configuration.ConfigurationException
doConfigure
in class AbstractUsersRepository
org.apache.commons.configuration.ConfigurationException
public User getUserByName(String username)
username
- the name of the user to retrievepublic String getRealName(String name)
name
- the name to case-correctpublic void updateUser(User user) throws UsersRepositoryException
user
- the userUsersRepositoryException
- If an error occurredpublic void removeUser(String username) throws UsersRepositoryException
username
- the user to remove from the repositoryUsersRepositoryException
public boolean contains(String name) throws UsersRepositoryException
name
- the name to check in the repositoryUsersRepositoryException
public boolean test(String username, String password) throws UsersRepositoryException
username
- the name of the user to be testedpassword
- the password to be testedUsersRepositoryException
public int countUsers() throws UsersRepositoryException
UsersRepositoryException
public Iterator<String> list() throws UsersRepositoryException
UsersRepositoryException
protected void doAddUser(String username, String password) throws UsersRepositoryException
AbstractUsersRepository
doAddUser
in class AbstractUsersRepository
UsersRepositoryException
- If an error occurredCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.