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, supportVirtualHostingpublic void setRepository(javax.jcr.Repository repository)
public void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
throws org.apache.commons.configuration.ConfigurationException
doConfigure in class AbstractUsersRepositoryorg.apache.commons.configuration.ConfigurationExceptionpublic 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 repositoryUsersRepositoryExceptionpublic boolean contains(String name) throws UsersRepositoryException
name - the name to check in the repositoryUsersRepositoryExceptionpublic boolean test(String username, String password) throws UsersRepositoryException
username - the name of the user to be testedpassword - the password to be testedUsersRepositoryExceptionpublic int countUsers()
throws UsersRepositoryException
UsersRepositoryExceptionpublic Iterator<String> list() throws UsersRepositoryException
UsersRepositoryExceptionprotected void doAddUser(String username, String password) throws UsersRepositoryException
AbstractUsersRepositorydoAddUser in class AbstractUsersRepositoryUsersRepositoryException - If an error occurredCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.