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, supportVirtualHostingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddUser, contains, countUsers, getUserByName, list, removeUser, supportVirtualHosting, testprotected boolean ignoreCase
protected boolean enableAliases
protected boolean enableForwarding
public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
throws org.apache.commons.configuration.ConfigurationException
Configurableconfigure in interface Configurableconfigure in class AbstractUsersRepositoryorg.apache.commons.configuration.ConfigurationExceptionConfigurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)protected abstract void doAddUser(User user) throws UsersRepositoryException
user - the user to addUsersRepositoryExceptionprotected abstract void doUpdateUser(User user) throws UsersRepositoryException
user - the user to updateUsersRepositoryExceptionprotected void doAddUser(String username, String password) throws UsersRepositoryException
AbstractUsersRepositorydoAddUser in class AbstractUsersRepositoryUsersRepositoryException - If an error occurredAbstractUsersRepository.doAddUser(java.lang.String, java.lang.String)public void updateUser(User user) throws UsersRepositoryException
updateUser in interface UsersRepositoryuser - the user to be updatedUsersRepositoryExceptionpublic Collection<String> getMappings(String username, String domain) throws RecipientRewriteTable.ErrorMappingException, RecipientRewriteTableException
RecipientRewriteTablegetMappings in interface RecipientRewriteTableusername - the MailAddressRecipientRewriteTableExceptionRecipientRewriteTable.ErrorMappingException - get thrown if an error mapping was foundRecipientRewriteTable.getMappings(java.lang.String,
java.lang.String)public void setEnableAliases(boolean enableAliases)
JamesUsersRepositorysetEnableAliases in interface JamesUsersRepositoryenableAliases - enableJamesUsersRepository.setEnableAliases(boolean)public void setEnableForwarding(boolean enableForwarding)
JamesUsersRepositorysetEnableForwarding in interface JamesUsersRepositoryenableForwarding - enableJamesUsersRepository.setEnableForwarding(boolean)public void setIgnoreCase(boolean ignoreCase)
JamesUsersRepositorysetIgnoreCase in interface JamesUsersRepositoryignoreCase - ignoreJamesUsersRepository.setIgnoreCase(boolean)public Map<String,Collection<String>> getAllMappings() throws RecipientRewriteTableException
RecipientRewriteTablegetAllMappings in interface RecipientRewriteTableRecipientRewriteTableExceptionRecipientRewriteTable.getAllMappings()public Collection<String> getUserDomainMappings(String user, String domain) throws RecipientRewriteTableException
RecipientRewriteTablegetUserDomainMappings in interface RecipientRewriteTableuser - the usernamedomain - the domainRecipientRewriteTableExceptionRecipientRewriteTable.getUserDomainMappings(java.lang.String, java.lang.String)public void addRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException
RecipientRewriteTableaddRegexMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedregex - the regex.RecipientRewriteTableExceptionpublic void removeRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException
RecipientRewriteTableremoveRegexMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedregex - the regex.RecipientRewriteTableExceptionpublic void addAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException
RecipientRewriteTableaddAddressMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedRecipientRewriteTableExceptionpublic void removeAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException
RecipientRewriteTableremoveAddressMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedRecipientRewriteTableExceptionpublic void addErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException
RecipientRewriteTableaddErrorMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usederror - the regex.RecipientRewriteTableExceptionpublic void removeErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException
RecipientRewriteTableremoveErrorMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedRecipientRewriteTableExceptionpublic void addMapping(String user, String domain, String mapping) throws RecipientRewriteTableException
RecipientRewriteTableaddMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedmapping - the mappingRecipientRewriteTableExceptionpublic void removeMapping(String user, String domain, String mapping) throws RecipientRewriteTableException
RecipientRewriteTableremoveMapping in interface RecipientRewriteTableuser - the username. Null if no username should be useddomain - the domain. Null if no domain should be usedmapping - the mappingRecipientRewriteTableExceptionpublic void addAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException
RecipientRewriteTableaddAliasDomainMapping in interface RecipientRewriteTablealiasDomain - the aliasdomain which should be mapped to the realDomainrealDomain - the realDomainRecipientRewriteTableExceptionpublic void removeAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException
RecipientRewriteTableremoveAliasDomainMapping in interface RecipientRewriteTablealiasDomain - the aliasdomain which should be mapped to the realDomainrealDomain - the realDomainRecipientRewriteTableExceptionCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.