org.apache.james.api.domainlist
Class SimpleDomainList

java.lang.Object
  extended by org.apache.james.api.domainlist.SimpleDomainList
All Implemented Interfaces:
DomainList, ManageableDomainList

public class SimpleDomainList
extends java.lang.Object
implements ManageableDomainList

Simplest implementation for ManageableDomainList


Field Summary
 
Fields inherited from interface org.apache.james.api.domainlist.ManageableDomainList
ROLE
 
Constructor Summary
SimpleDomainList()
           
 
Method Summary
 boolean addDomain(java.lang.String domain)
          Add domain to the service
 boolean containsDomain(java.lang.String domain)
          Return true if the domain exists in the service
 java.util.List getDomains()
          Return List of domains which should be used as localdomains.
 boolean removeDomain(java.lang.String domain)
          Remove domain from the service
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDomainList

public SimpleDomainList()
Method Detail

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

getDomains

public java.util.List getDomains()
Description copied from interface: DomainList
Return List of domains which should be used as localdomains. Return null if no domains were found

Specified by:
getDomains in interface DomainList
Returns:
domains

setAutoDetect

public void setAutoDetect(boolean autodetect)
Description copied from interface: DomainList
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

Specified by:
setAutoDetect in interface DomainList
Parameters:
autodetect - set to false for disable

setAutoDetectIP

public void setAutoDetectIP(boolean autodetectIP)
Description copied from interface: DomainList
Set to true to lookup the ipaddresses for each given domain and add these to the domain service Default is true

Specified by:
setAutoDetectIP in interface DomainList
Parameters:
autodetectIP - set to false for disable

addDomain

public boolean addDomain(java.lang.String domain)
Description copied from interface: ManageableDomainList
Add domain to the service

Specified by:
addDomain in interface ManageableDomainList
Parameters:
domain - domain to add
Returns:
true if successfully

removeDomain

public boolean removeDomain(java.lang.String domain)
Description copied from interface: ManageableDomainList
Remove domain from the service

Specified by:
removeDomain in interface ManageableDomainList
Parameters:
domain - domain to remove
Returns:
true if succesfully


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