org.apache.james.domain
Class JDBCDomainList

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.domain.AbstractDomainList
          extended by org.apache.james.domain.JDBCDomainList
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, DomainList, ManageableDomainList

public class JDBCDomainList
extends AbstractDomainList
implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable

Allow to query a costum table for domains


Field Summary
protected  java.lang.String datasourceName
           
protected  SqlResources sqlQueries
          Contains all of the sql strings for this component.
 
Fields inherited from interface org.apache.james.api.domainlist.ManageableDomainList
ROLE
 
Constructor Summary
JDBCDomainList()
           
 
Method Summary
protected  boolean addDomainInternal(java.lang.String domain)
          Add domain
 void configure(org.apache.avalon.framework.configuration.Configuration arg0)
           
 boolean containsDomain(java.lang.String domain)
          Return true if the domain exists in the service
protected  java.util.List getDomainListInternal()
          Return domainList
 void initialize()
           
protected  boolean removeDomainInternal(java.lang.String domain)
          Remove domain
 void service(org.apache.avalon.framework.service.ServiceManager arg0)
           
 void setDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSourceComponent)
           
 void setFileSystem(FileSystem fileSystem)
           
 
Methods inherited from class org.apache.james.domain.AbstractDomainList
addDomain, getDNSServer, getDomains, removeDomain, setAutoDetect, setAutoDetectIP
 
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
 

Field Detail

sqlQueries

protected SqlResources sqlQueries
Contains all of the sql strings for this component.


datasourceName

protected java.lang.String datasourceName
Constructor Detail

JDBCDomainList

public JDBCDomainList()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager arg0)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Overrides:
service in class AbstractDomainList
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

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
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception
See Also:
Initializable.initialize()

setDataSourceComponent

public void setDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSourceComponent)

setFileSystem

public void setFileSystem(FileSystem fileSystem)

getDomainListInternal

protected java.util.List getDomainListInternal()
Description copied from class: AbstractDomainList
Return domainList

Specified by:
getDomainListInternal in class AbstractDomainList
Returns:
List
See Also:
AbstractDomainList.getDomainListInternal()

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)

addDomainInternal

protected boolean addDomainInternal(java.lang.String domain)
Description copied from class: AbstractDomainList
Add domain

Specified by:
addDomainInternal in class AbstractDomainList
Parameters:
domain - domain to add
Returns:
true if successfully
See Also:
AbstractDomainList.addDomainInternal(java.lang.String)

removeDomainInternal

protected boolean removeDomainInternal(java.lang.String domain)
Description copied from class: AbstractDomainList
Remove domain

Specified by:
removeDomainInternal in class AbstractDomainList
Parameters:
domain - domain to remove
Returns:
true if successfully
See Also:
AbstractDomainList.removeDomainInternal(java.lang.String)


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