|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.james.userrepository.AbstractUsersRepository
A partial implementation of a Repository to store users.
This implements common functionality found in different UsersRespository implementations, and makes it easier to create new User repositories.
Fields inherited from interface org.apache.james.services.UsersRepository |
ROLE, USER |
Constructor Summary | |
AbstractUsersRepository()
|
Method Summary | |
void |
addUser(java.lang.String name,
java.lang.Object attributes)
Adds a user to the repository with the specified attributes. |
boolean |
addUser(User user)
Adds a user to the repository with the specified User object. |
boolean |
contains(java.lang.String name)
Returns whether or not this user is in the repository |
boolean |
containsCaseInsensitive(java.lang.String name)
Returns whether or not this user is in the repository. |
int |
countUsers()
Returns a count of the users in the repository. |
protected abstract void |
doAddUser(User user)
Adds a user to the underlying Repository. |
protected abstract void |
doRemoveUser(User user)
Removes a user from the underlying repository. |
protected abstract void |
doUpdateUser(User user)
Updates a user record to match the supplied User. |
java.lang.Object |
getAttributes(java.lang.String name)
Deprecated. As of James 1.2.2 . Use the getUserByName method. |
java.lang.String |
getRealName(java.lang.String name)
Returns the user name of the user matching name on an equalsIgnoreCase basis. |
User |
getUserByName(java.lang.String name)
Get the user object with the specified user name. |
protected User |
getUserByName(java.lang.String name,
boolean ignoreCase)
Gets a user by name, ignoring case if specified. |
User |
getUserByNameCaseInsensitive(java.lang.String name)
Get the user object with the specified user name. |
java.util.Iterator |
list()
List users in repository. |
protected abstract java.util.Iterator |
listAllUsers()
Returns a list populated with all of the Users in the repository. |
protected java.util.List |
listUserNames()
Produces the complete list of User names, with correct case. |
void |
removeUser(java.lang.String name)
Removes a user from the repository |
boolean |
test(java.lang.String name,
java.lang.Object attributes)
Deprecated. As of James 1.2.2, use test(String name, String password) |
boolean |
test(java.lang.String name,
java.lang.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.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractUsersRepository()
Method Detail |
protected abstract java.util.Iterator listAllUsers()
Iterator
of User
s.protected abstract void doAddUser(User user)
protected abstract void doRemoveUser(User user)
protected abstract void doUpdateUser(User user)
protected java.util.List listUserNames()
List
of String
s representing
user names.protected User getUserByName(java.lang.String name, boolean ignoreCase)
name
.public boolean addUser(User user)
addUser
in interface UsersRepository
public void addUser(java.lang.String name, java.lang.Object attributes)
addUser
in interface UsersRepository
public boolean updateUser(User user)
updateUser
in interface UsersRepository
public void removeUser(java.lang.String name)
removeUser
in interface UsersRepository
public java.lang.Object getAttributes(java.lang.String name)
getUserByName
method.
getAttributes
in interface UsersRepository
public User getUserByName(java.lang.String name)
getUserByName
in interface UsersRepository
public User getUserByNameCaseInsensitive(java.lang.String name)
getUserByNameCaseInsensitive
in interface UsersRepository
public java.lang.String getRealName(java.lang.String name)
getRealName
in interface UsersRepository
public boolean contains(java.lang.String name)
contains
in interface UsersRepository
public boolean containsCaseInsensitive(java.lang.String name)
containsCaseInsensitive
in interface UsersRepository
public boolean test(java.lang.String name, java.lang.Object attributes)
test(String name, String password)
test
in interface UsersRepository
public boolean test(java.lang.String name, java.lang.String password)
test
in interface UsersRepository
public int countUsers()
countUsers
in interface UsersRepository
public java.util.Iterator list()
list
in interface UsersRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |