| org.apache.james.userrepository.AbstractUsersRepository
All known Subclasses: org.apache.james.userrepository.AbstractJdbcUsersRepository,
AbstractUsersRepository | abstract public class AbstractUsersRepository extends AbstractLogEnabled implements UsersRepository,Component(Code) | | 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.
|
addUser | public boolean addUser(User user)(Code) | | Adds a user to the repository with the specified User object.
Users names must be unique-case-insensitive in the repository.
Parameters: user - the user to be added true if succesful, false otherwise since: James 1.2.2 |
addUser | public void addUser(String name, Object attributes)(Code) | | Adds a user to the repository with the specified attributes. In current
implementations, the Object attributes is generally a String password.
Parameters: name - the name of the user to be added Parameters: attributes - the password value as a String |
contains | public boolean contains(String name)(Code) | | Returns whether or not this user is in the repository
|
containsCaseInsensitive | public boolean containsCaseInsensitive(String name)(Code) | | Returns whether or not this user is in the repository. Names are
matched on a case insensitive basis.
|
countUsers | public int countUsers()(Code) | | Returns a count of the users in the repository.
the number of users in the repository |
doAddUser | abstract protected void doAddUser(User user)(Code) | | Adds a user to the underlying Repository.
The user name must not clash with an existing user.
|
doRemoveUser | abstract protected void doRemoveUser(User user)(Code) | | Removes a user from the underlying repository.
If the user doesn't exist, returns ok.
|
doUpdateUser | abstract protected void doUpdateUser(User user)(Code) | | Updates a user record to match the supplied User.
|
getRealName | public String getRealName(String name)(Code) | | Returns the user name of the user matching name on an equalsIgnoreCase
basis. Returns null if no match.
Parameters: name - the name of the user to retrieve the correct case sensitive name of the user |
getUserByName | protected User getUserByName(String name, boolean ignoreCase)(Code) | | Gets a user by name, ignoring case if specified.
This implementation gets the entire set of users,
and scrolls through searching for one matching name .
Parameters: name - the name of the user being retrieved Parameters: ignoreCase - whether the name is regarded as case-insensitive the user being retrieved, null if the user doesn't exist |
getUserByName | public User getUserByName(String name)(Code) | | Get the user object with the specified user name. Return null if no
such user.
Parameters: name - the name of the user to retrieve the user if found, null otherwise since: James 1.2.2 |
getUserByNameCaseInsensitive | public User getUserByNameCaseInsensitive(String name)(Code) | | Get the user object with the specified user name. Match user naems on
a case insensitive basis. Return null if no such user.
Parameters: name - the name of the user to retrieve the user if found, null otherwise since: James 1.2.2 |
list | public Iterator list()(Code) | | List users in repository.
Iterator over a collection of Strings, each being one user in the repository. |
listAllUsers | abstract protected Iterator listAllUsers()(Code) | | Returns a list populated with all of the Users in the repository.
an Iterator of User s. |
listUserNames | protected List listUserNames()(Code) | | Produces the complete list of User names, with correct case.
a List of String s representinguser names. |
removeUser | public void removeUser(String name)(Code) | | Removes a user from the repository
Parameters: user - the user to be removed |
test | public boolean test(String name, String password)(Code) | | Test if user with name 'name' has password 'password'.
Parameters: name - the name of the user to be tested Parameters: password - the password to be tested true if the test is successful, false if thepassword is incorrect or the user doesn'texist since: James 1.2.2 |
updateUser | public boolean updateUser(User user)(Code) | | Update the repository with the specified user object. A user object
with this username must already exist.
Parameters: user - the user to be updated true if successful. |
|
|