org.apache.james.vut
Class XMLVirtualUserTable

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.impl.vut.AbstractVirtualUserTable
          extended by org.apache.james.vut.XMLVirtualUserTable
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, DomainList, VirtualUserTableManagement, VirtualUserTable

public class XMLVirtualUserTable
extends AbstractVirtualUserTable
implements org.apache.avalon.framework.configuration.Configurable


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
XMLVirtualUserTable()
           
 
Method Summary
 boolean addMappingInternal(java.lang.String user, java.lang.String domain, java.lang.String mapping)
          Not implemented
 void configure(org.apache.avalon.framework.configuration.Configuration arg0)
           
 boolean containsDomain(java.lang.String domain)
          Return true if the domain exists in the service
 java.util.Map getAllMappingsInternal()
          Return a Map which holds all Mappings
protected  java.util.List getDomainsInternal()
          Return List of all domains for which email should accepted
 java.util.Collection getUserDomainMappingsInternal(java.lang.String user, java.lang.String domain)
          Return Collection of all mappings for the given username and domain
protected  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 removeMappingInternal(java.lang.String user, java.lang.String domain, java.lang.String mapping)
          Not implemented
 
Methods inherited from class org.apache.james.impl.vut.AbstractVirtualUserTable
addAddressMapping, addAliasDomainMapping, addErrorMapping, addMapping, addRegexMapping, getAllMappings, getDomains, getMappings, getMappings, getUserDomainMappings, removeAddressMapping, removeAliasDomainMapping, removeErrorMapping, removeMapping, removeRegexMapping, service, setAutoDetect, setAutoDetectIP, setMappingLimit, setRecursiveMapping
 
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
 

Constructor Detail

XMLVirtualUserTable

public XMLVirtualUserTable()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration arg0)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class AbstractVirtualUserTable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

addMappingInternal

public boolean addMappingInternal(java.lang.String user,
                                  java.lang.String domain,
                                  java.lang.String mapping)
Not implemented

Specified by:
addMappingInternal in class AbstractVirtualUserTable
Parameters:
user - the user
domain - the domain
mapping - the mapping
Returns:
true if successfully

mapAddressInternal

protected java.lang.String mapAddressInternal(java.lang.String user,
                                              java.lang.String domain)
Description copied from class: AbstractVirtualUserTable
Override to map virtual recipients to real recipients, both local and non-local. Each key in the provided map corresponds to a potential virtual recipient, stored as a 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.

Specified by:
mapAddressInternal in class AbstractVirtualUserTable
Parameters:
user - the mapping of virtual to real recipients, as MailAddresses to Strings.
See Also:
AbstractVirtualUserTable.mapAddressInternal(java.lang.String, java.lang.String)

removeMappingInternal

public boolean removeMappingInternal(java.lang.String user,
                                     java.lang.String domain,
                                     java.lang.String mapping)
Not implemented

Specified by:
removeMappingInternal in class AbstractVirtualUserTable
Parameters:
user - the user
domain - the domain
mapping - the mapping
Returns:
true if successfully

getUserDomainMappingsInternal

public java.util.Collection getUserDomainMappingsInternal(java.lang.String user,
                                                          java.lang.String domain)
Description copied from class: AbstractVirtualUserTable
Return Collection of all mappings for the given username and domain

Specified by:
getUserDomainMappingsInternal in class AbstractVirtualUserTable
Parameters:
user - the user
domain - the domain
Returns:
Collection which hold the mappings
See Also:
AbstractVirtualUserTable.getUserDomainMappingsInternal(java.lang.String, java.lang.String)

getDomainsInternal

protected java.util.List getDomainsInternal()
Description copied from class: AbstractVirtualUserTable
Return List of all domains for which email should accepted

Specified by:
getDomainsInternal in class AbstractVirtualUserTable
Returns:
domains the domains
See Also:
AbstractVirtualUserTable.getDomainsInternal()

containsDomain

public boolean containsDomain(java.lang.String domain)
Description copied from interface: DomainList
Return true if the domain exists in the service

Specified by:
containsDomain in interface DomainList
Parameters:
domain - the domain
Returns:
true if the given domain exists in the service
See Also:
DomainList.containsDomain(java.lang.String)

getAllMappingsInternal

public java.util.Map getAllMappingsInternal()
Description copied from class: AbstractVirtualUserTable
Return a Map which holds all Mappings

Specified by:
getAllMappingsInternal in class AbstractVirtualUserTable
Returns:
Map
See Also:
AbstractVirtualUserTable.getAllMappingsInternal()


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.