|
||||||||||
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.vut.AbstractVirtualUserTable
public abstract class AbstractVirtualUserTable
Field Summary |
---|
Fields inherited from interface org.apache.james.api.vut.management.VirtualUserTableManagement |
---|
ROLE |
Fields inherited from interface org.apache.james.api.domainlist.DomainList |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractVirtualUserTable()
|
Method Summary | |
---|---|
boolean |
addAddressMapping(java.lang.String user,
java.lang.String domain,
java.lang.String address)
Add address mapping |
boolean |
addAliasDomainMapping(java.lang.String aliasDomain,
java.lang.String realDomain)
Add aliasDomain mapping |
boolean |
addErrorMapping(java.lang.String user,
java.lang.String domain,
java.lang.String error)
Add error mapping |
boolean |
addMapping(java.lang.String user,
java.lang.String domain,
java.lang.String mapping)
Add mapping |
protected abstract boolean |
addMappingInternal(java.lang.String user,
java.lang.String domain,
java.lang.String mapping)
Add new mapping |
boolean |
addRegexMapping(java.lang.String user,
java.lang.String domain,
java.lang.String regex)
Add regex mapping |
void |
configure(org.apache.avalon.framework.configuration.Configuration arg0)
|
java.util.Map |
getAllMappings()
Return a Map which holds all mappings. |
protected abstract java.util.Map |
getAllMappingsInternal()
Return a Map which holds all Mappings |
java.util.List |
getDomains()
Return List of domains which should be used as localdomains. |
protected abstract java.util.List |
getDomainsInternal()
Return List of all domains for which email should accepted |
java.util.Collection |
getMappings(java.lang.String user,
java.lang.String domain)
Return the mapped MailAddress for the given address. |
java.util.Collection |
getMappings(java.lang.String user,
java.lang.String domain,
int mappingLimit)
|
java.util.Collection |
getUserDomainMappings(java.lang.String user,
java.lang.String domain)
Return the explicit mapping stored for the given user and domain. |
protected abstract java.util.Collection |
getUserDomainMappingsInternal(java.lang.String user,
java.lang.String domain)
Return Collection of all mappings for the given username and domain |
protected abstract java.lang.String |
mapAddressInternal(java.lang.String user,
java.lang.String domain)
Override to map virtual recipients to real recipients, both local and non-local. |
boolean |
removeAddressMapping(java.lang.String user,
java.lang.String domain,
java.lang.String address)
Remove address mapping |
boolean |
removeAliasDomainMapping(java.lang.String aliasDomain,
java.lang.String realDomain)
Remove aliasDomain mapping |
boolean |
removeErrorMapping(java.lang.String user,
java.lang.String domain,
java.lang.String error)
Remove error mapping |
boolean |
removeMapping(java.lang.String user,
java.lang.String domain,
java.lang.String mapping)
Remove mapping |
protected abstract boolean |
removeMappingInternal(java.lang.String user,
java.lang.String domain,
java.lang.String mapping)
Remove mapping |
boolean |
removeRegexMapping(java.lang.String user,
java.lang.String domain,
java.lang.String regex)
Remove regex mapping |
void |
service(org.apache.avalon.framework.service.ServiceManager arg0)
|
void |
setAutoDetect(boolean autoDetect)
Set to true to autodetect the hostname of the host on which james is runnin, and add this to the domain service Default is true |
void |
setAutoDetectIP(boolean autoDetectIP)
Set to true to lookup the ipaddresses for each given domain and add these to the domain service Default is true |
void |
setMappingLimit(int mappingLimit)
Set the mappingLimit |
void |
setRecursiveMapping(boolean recursive)
|
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.domainlist.DomainList |
---|
containsDomain |
Constructor Detail |
---|
public AbstractVirtualUserTable()
Method Detail |
---|
public void service(org.apache.avalon.framework.service.ServiceManager arg0) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
org.apache.avalon.framework.service.ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public void configure(org.apache.avalon.framework.configuration.Configuration arg0) 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)
public void setRecursiveMapping(boolean recursive)
public void setMappingLimit(int mappingLimit) throws java.lang.IllegalArgumentException
mappingLimit
- the mappingLimit
java.lang.IllegalArgumentException
- get thrown if mappingLimit smaller then 1 is usedpublic java.util.Collection getMappings(java.lang.String user, java.lang.String domain) throws ErrorMappingException
VirtualUserTable
getMappings
in interface VirtualUserTable
user
- the MailAddress
ErrorMappingException
- get thrown if an error mapping was foundVirtualUserTable.getMappings(String, String)
public java.util.Collection getMappings(java.lang.String user, java.lang.String domain, int mappingLimit) throws ErrorMappingException
ErrorMappingException
public boolean addRegexMapping(java.lang.String user, java.lang.String domain, java.lang.String regex) throws InvalidMappingException
VirtualUserTableManagement
addRegexMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedregex
- the regex.
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.addRegexMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean removeRegexMapping(java.lang.String user, java.lang.String domain, java.lang.String regex) throws InvalidMappingException
VirtualUserTableManagement
removeRegexMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedregex
- the regex.
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.removeRegexMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean addAddressMapping(java.lang.String user, java.lang.String domain, java.lang.String address) throws InvalidMappingException
VirtualUserTableManagement
addAddressMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be used
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.addAddressMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean removeAddressMapping(java.lang.String user, java.lang.String domain, java.lang.String address) throws InvalidMappingException
VirtualUserTableManagement
removeAddressMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be used
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.removeAddressMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean addErrorMapping(java.lang.String user, java.lang.String domain, java.lang.String error) throws InvalidMappingException
VirtualUserTableManagement
addErrorMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usederror
- the regex.
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.addErrorMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean removeErrorMapping(java.lang.String user, java.lang.String domain, java.lang.String error) throws InvalidMappingException
VirtualUserTableManagement
removeErrorMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be used
InvalidMappingException
- get thrown if an invalid argument was givenVirtualUserTableManagement.removeErrorMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean addMapping(java.lang.String user, java.lang.String domain, java.lang.String mapping) throws InvalidMappingException
VirtualUserTableManagement
addMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedmapping
- the mapping
InvalidMappingException
VirtualUserTableManagement.addMapping(java.lang.String, java.lang.String, java.lang.String)
public boolean removeMapping(java.lang.String user, java.lang.String domain, java.lang.String mapping) throws InvalidMappingException
VirtualUserTableManagement
removeMapping
in interface VirtualUserTableManagement
user
- the username. Null if no username should be useddomain
- the domain. Null if no domain should be usedmapping
- the mapping
InvalidMappingException
VirtualUserTableManagement.removeMapping(java.lang.String, java.lang.String, java.lang.String)
public java.util.Map getAllMappings()
VirtualUserTableManagement
getAllMappings
in interface VirtualUserTableManagement
VirtualUserTableManagement.getAllMappings()
public java.util.List getDomains()
DomainList
getDomains
in interface DomainList
DomainList.getDomains()
public java.util.Collection getUserDomainMappings(java.lang.String user, java.lang.String domain)
VirtualUserTableManagement
getUserDomainMappings
in interface VirtualUserTableManagement
user
- the usernamedomain
- the domain
VirtualUserTableManagement.getUserDomainMappings(java.lang.String, java.lang.String)
public void setAutoDetect(boolean autoDetect)
DomainList
setAutoDetect
in interface DomainList
autoDetect
- set to false for disableDomainList.setAutoDetect(boolean)
public void setAutoDetectIP(boolean autoDetectIP)
DomainList
setAutoDetectIP
in interface DomainList
autoDetectIP
- set to false for disableDomainList.setAutoDetectIP(boolean)
public boolean addAliasDomainMapping(java.lang.String aliasDomain, java.lang.String realDomain) throws InvalidMappingException
VirtualUserTableManagement
addAliasDomainMapping
in interface VirtualUserTableManagement
aliasDomain
- the aliasdomain which should be mapped to the realDomainrealDomain
- the realDomain
InvalidMappingException
VirtualUserTableManagement.addAliasDomainMapping(java.lang.String, java.lang.String)
public boolean removeAliasDomainMapping(java.lang.String aliasDomain, java.lang.String realDomain) throws InvalidMappingException
VirtualUserTableManagement
removeAliasDomainMapping
in interface VirtualUserTableManagement
aliasDomain
- the aliasdomain which should be mapped to the realDomainrealDomain
- the realDomain
InvalidMappingException
VirtualUserTableManagement.removeAliasDomainMapping(java.lang.String, java.lang.String)
protected abstract boolean addMappingInternal(java.lang.String user, java.lang.String domain, java.lang.String mapping) throws InvalidMappingException
user
- the userdomain
- the domainmapping
- the mapping
InvalidMappingException
protected abstract boolean removeMappingInternal(java.lang.String user, java.lang.String domain, java.lang.String mapping) throws InvalidMappingException
user
- the userdomain
- the domainmapping
- the mapping
InvalidMappingException
protected abstract java.util.List getDomainsInternal()
protected abstract java.util.Collection getUserDomainMappingsInternal(java.lang.String user, java.lang.String domain)
user
- the userdomain
- the domain
protected abstract java.util.Map getAllMappingsInternal()
protected abstract java.lang.String mapAddressInternal(java.lang.String user, java.lang.String domain)
MailAddress
object.
Translate virtual recipients to real recipients by mapping a string containing the
address of the real recipient as a value to a key. Leave the value null
if no mapping should be performed. Multiple recipients may be specified by delineating
the mapped string with commas, semi-colons or colons.
- Parameters:
user
- the mapping of virtual to real recipients, as
MailAddress
es to String
s.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |