|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.impl.jamesuser.AbstractUsersRepository
public abstract class 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.
Field Summary | |
---|---|
protected boolean |
enableAliases
Enable Aliases frmo JamesUser |
protected boolean |
enableForwarding
Wether to enable forwarding for JamesUser or not |
protected boolean |
ignoreCase
Ignore case in usernames |
Fields inherited from interface org.apache.james.api.user.UsersRepository |
---|
ROLE, USER |
Fields inherited from interface org.apache.james.api.vut.VirtualUserTable |
---|
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, ROLE |
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. |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected abstract void |
doAddUser(User user)
Adds a user to the underlying Repository. |
protected abstract void |
doUpdateUser(User user)
Updates a user record to match the supplied User. |
java.util.Collection |
getMappings(java.lang.String username,
java.lang.String domain)
Return the mapped MailAddress for the given address. |
void |
setEnableAliases(boolean enableAliases)
enable/disable aliases in case of JamesUsers |
void |
setEnableForwarding(boolean enableForwarding)
enable/disable aliases in case of JamesUsers |
void |
setIgnoreCase(boolean ignoreCase)
set case sensitive/insensitive operations |
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 |
Methods inherited from interface org.apache.james.api.user.UsersRepository |
---|
addUser, contains, containsCaseInsensitive, countUsers, getRealName, getUserByName, getUserByNameCaseInsensitive, list, removeUser, test |
Field Detail |
---|
protected boolean ignoreCase
protected boolean enableAliases
protected boolean enableForwarding
Constructor Detail |
---|
public AbstractUsersRepository()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
protected abstract void doAddUser(User user)
user
- the user to addprotected abstract void doUpdateUser(User user)
user
- the user to updatepublic void addUser(java.lang.String name, java.lang.Object attributes)
addUser
in interface UsersRepository
name
- the name of the user to be addedattributes
- the password value as a Stringpublic boolean addUser(User user)
addUser
in interface UsersRepository
user
- the user to be added
public boolean updateUser(User user)
updateUser
in interface UsersRepository
user
- the user to be updated
public java.util.Collection getMappings(java.lang.String username, java.lang.String domain) throws ErrorMappingException
VirtualUserTable
getMappings
in interface VirtualUserTable
username
- the MailAddress
ErrorMappingException
- get thrown if an error mapping was foundVirtualUserTable.getMappings(java.lang.String,
java.lang.String)
public void setEnableAliases(boolean enableAliases)
JamesUsersRepository
setEnableAliases
in interface JamesUsersRepository
enableAliases
- enableJamesUsersRepository.setEnableAliases(boolean)
public void setEnableForwarding(boolean enableForwarding)
JamesUsersRepository
setEnableForwarding
in interface JamesUsersRepository
enableForwarding
- enableJamesUsersRepository.setEnableForwarding(boolean)
public void setIgnoreCase(boolean ignoreCase)
JamesUsersRepository
setIgnoreCase
in interface JamesUsersRepository
ignoreCase
- ignoreJamesUsersRepository.setIgnoreCase(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |