|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.james.userrepository.UsersFileRepository
Implementation of a Repository to store users on the File System.
Requires a configuration element in the .conf.xml file of the form:
Field Summary | |
protected static boolean |
DEEP_DEBUG
Whether 'deep debugging' is turned on. |
Fields inherited from interface org.apache.james.services.UsersRepository |
ROLE, USER |
Constructor Summary | |
UsersFileRepository()
|
Method Summary | |
void |
addUser(String name,
Object attributes)
Adds a user to the repository with the specified attributes. |
boolean |
addUser(User user)
Update the repository with the specified user object. |
void |
compose(ComponentManager componentManager)
|
void |
configure(Configuration configuration)
|
boolean |
contains(String name)
Returns whether or not this user is in the repository |
boolean |
containsCaseInsensitive(String name)
Returns whether or not this user is in the repository. |
int |
countUsers()
Returns a count of the users in the repository. |
Object |
getAttributes(String name)
Gets the attribute for a user. |
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. |
User |
getUserByNameCaseInsensitive(String name)
Get the user object with the specified user name. |
void |
initialize()
|
Iterator |
list()
List users in repository. |
void |
removeUser(String name)
Removes a user from the repository |
boolean |
test(String name,
Object attributes)
Tests a user with the appropriate attributes. |
boolean |
test(String name,
String password)
Test if user with name 'name' has password 'password'. |
boolean |
updateUser(User user)
Update the repository with the specified user object. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static boolean DEEP_DEBUG
Constructor Detail |
public UsersFileRepository()
Method Detail |
public void compose(ComponentManager componentManager) throws ComponentException
compose
in interface Composable
ComponentException
Composable.compose(ComponentManager)
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws Exception
initialize
in interface Initializable
Exception
Initializable.initialize()
public Iterator list()
list
in interface UsersRepository
public boolean addUser(User user)
addUser
in interface UsersRepository
user
- the user to be added.
public void addUser(String name, Object attributes)
UsersRepository
addUser
in interface UsersRepository
name
- the name of the user to be addedattributes
- see decriptionpublic User getUserByName(String name)
UsersRepository
getUserByName
in interface UsersRepository
name
- the name of the user to retrieve
public User getUserByNameCaseInsensitive(String name)
UsersRepository
getUserByNameCaseInsensitive
in interface UsersRepository
name
- the name of the user to retrieve
public String getRealName(String name)
UsersRepository
getRealName
in interface UsersRepository
name
- the name to case-correct
public Object getAttributes(String name)
UsersRepository
getAttributes
in interface UsersRepository
public boolean updateUser(User user)
UsersRepository
updateUser
in interface UsersRepository
public void removeUser(String name)
UsersRepository
removeUser
in interface UsersRepository
name
- the user to remove from the repositorypublic boolean contains(String name)
UsersRepository
contains
in interface UsersRepository
name
- the name to check in the repository
public boolean containsCaseInsensitive(String name)
UsersRepository
containsCaseInsensitive
in interface UsersRepository
name
- the name to check in the repository
public boolean test(String name, Object attributes)
UsersRepository
test
in interface UsersRepository
public boolean test(String name, String password)
UsersRepository
test
in interface UsersRepository
name
- the name of the user to be testedpassword
- the password to be tested
public int countUsers()
UsersRepository
countUsers
in interface UsersRepository
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |