UsersRepository
@Deprecated public abstract class AbstractJamesUsersRepository extends AbstractUsersRepository implements JamesUsersRepository, RecipientRewriteTable
This implements common functionality found in different UsersRespository implementations, and makes it easier to create new User repositories.
RecipientRewriteTable.ErrorMappingException
Modifier and Type | Field and Description |
---|---|
protected boolean |
enableAliases
Deprecated.
Enable Aliases frmo JamesUser
|
protected boolean |
enableForwarding
Deprecated.
Wether to enable forwarding for JamesUser or not
|
protected boolean |
ignoreCase
Deprecated.
Ignore case in usernames
|
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, WILDCARD
Constructor and Description |
---|
AbstractJamesUsersRepository()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addAddressMapping(String user,
String domain,
String address)
Deprecated.
Add address mapping
|
void |
addAliasDomainMapping(String aliasDomain,
String realDomain)
Deprecated.
Add aliasDomain mapping
|
void |
addErrorMapping(String user,
String domain,
String error)
Deprecated.
Add error mapping
|
void |
addMapping(String user,
String domain,
String mapping)
Deprecated.
Add mapping
|
void |
addRegexMapping(String user,
String domain,
String regex)
Deprecated.
Add regex mapping
|
void |
configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
Deprecated.
Configure the object.
|
protected void |
doAddUser(String username,
String password)
Deprecated.
Add the user with the given username and password
|
protected abstract void |
doAddUser(User user)
Deprecated.
Adds a user to the underlying Repository.
|
protected abstract void |
doUpdateUser(User user)
Deprecated.
Updates a user record to match the supplied User.
|
Map<String,Collection<String>> |
getAllMappings()
Deprecated.
Return a Map which holds all mappings.
|
Collection<String> |
getMappings(String username,
String domain)
Deprecated.
Return the mapped MailAddress for the given address.
|
Collection<String> |
getUserDomainMappings(String user,
String domain)
Deprecated.
Return the explicit mapping stored for the given user and domain.
|
void |
removeAddressMapping(String user,
String domain,
String address)
Deprecated.
Remove address mapping
|
void |
removeAliasDomainMapping(String aliasDomain,
String realDomain)
Deprecated.
Remove aliasDomain mapping
|
void |
removeErrorMapping(String user,
String domain,
String error)
Deprecated.
Remove error mapping
|
void |
removeMapping(String user,
String domain,
String mapping)
Deprecated.
Remove mapping
|
void |
removeRegexMapping(String user,
String domain,
String regex)
Deprecated.
Remove regex mapping
|
void |
setEnableAliases(boolean enableAliases)
Deprecated.
enable/disable aliases in case of JamesUsers
|
void |
setEnableForwarding(boolean enableForwarding)
Deprecated.
enable/disable aliases in case of JamesUsers
|
void |
setIgnoreCase(boolean ignoreCase)
Deprecated.
set case sensitive/insensitive operations
|
void |
updateUser(User user)
Deprecated.
Update the repository with the specified user object.
|
addUser, doConfigure, getLogger, isValidUsername, setDomainList, setEnableVirtualHosting, setLog, supportVirtualHosting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUser, contains, countUsers, getUserByName, list, removeUser, supportVirtualHosting, test
protected boolean ignoreCase
protected boolean enableAliases
protected boolean enableForwarding
public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration) throws org.apache.commons.configuration.ConfigurationException
Configurable
configure
in interface Configurable
configure
in class AbstractUsersRepository
org.apache.commons.configuration.ConfigurationException
Configurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)
protected abstract void doAddUser(User user) throws UsersRepositoryException
user
- the user to addUsersRepositoryException
protected abstract void doUpdateUser(User user) throws UsersRepositoryException
user
- the user to updateUsersRepositoryException
protected void doAddUser(String username, String password) throws UsersRepositoryException
AbstractUsersRepository
doAddUser
in class AbstractUsersRepository
UsersRepositoryException
- If an error occurredAbstractUsersRepository.doAddUser(java.lang.String, java.lang.String)
public void updateUser(User user) throws UsersRepositoryException
updateUser
in interface UsersRepository
user
- the user to be updatedUsersRepositoryException
public Collection<String> getMappings(String username, String domain) throws RecipientRewriteTable.ErrorMappingException, RecipientRewriteTableException
RecipientRewriteTable
getMappings
in interface RecipientRewriteTable
username
- the MailAddressRecipientRewriteTableException
RecipientRewriteTable.ErrorMappingException
- get thrown if an error mapping was foundRecipientRewriteTable.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)
public Map<String,Collection<String>> getAllMappings() throws RecipientRewriteTableException
RecipientRewriteTable
getAllMappings
in interface RecipientRewriteTable
RecipientRewriteTableException
RecipientRewriteTable.getAllMappings()
public Collection<String> getUserDomainMappings(String user, String domain) throws RecipientRewriteTableException
RecipientRewriteTable
getUserDomainMappings
in interface RecipientRewriteTable
user
- the usernamedomain
- the domainRecipientRewriteTableException
RecipientRewriteTable.getUserDomainMappings(java.lang.String, java.lang.String)
public void addRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException
RecipientRewriteTable
addRegexMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedregex
- the regex.RecipientRewriteTableException
public void removeRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException
RecipientRewriteTable
removeRegexMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedregex
- the regex.RecipientRewriteTableException
public void addAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException
RecipientRewriteTable
addAddressMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedRecipientRewriteTableException
public void removeAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException
RecipientRewriteTable
removeAddressMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedRecipientRewriteTableException
public void addErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException
RecipientRewriteTable
addErrorMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usederror
- the regex.RecipientRewriteTableException
public void removeErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException
RecipientRewriteTable
removeErrorMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedRecipientRewriteTableException
public void addMapping(String user, String domain, String mapping) throws RecipientRewriteTableException
RecipientRewriteTable
addMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedmapping
- the mappingRecipientRewriteTableException
public void removeMapping(String user, String domain, String mapping) throws RecipientRewriteTableException
RecipientRewriteTable
removeMapping
in interface RecipientRewriteTable
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedmapping
- the mappingRecipientRewriteTableException
public void addAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException
RecipientRewriteTable
addAliasDomainMapping
in interface RecipientRewriteTable
aliasDomain
- the aliasdomain which should be mapped to the realDomainrealDomain
- the realDomainRecipientRewriteTableException
public void removeAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException
RecipientRewriteTable
removeAliasDomainMapping
in interface RecipientRewriteTable
aliasDomain
- the aliasdomain which should be mapped to the realDomainrealDomain
- the realDomainRecipientRewriteTableException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.