1 19 20 21 22 package org.apache.james; 23 24 import org.apache.avalon.framework.configuration.DefaultConfiguration; 25 import org.apache.james.test.util.Util; 26 27 public class JamesTestConfiguration extends DefaultConfiguration { 28 29 public JamesTestConfiguration() { 30 super("James"); 31 } 32 33 public void init() { 34 35 37 DefaultConfiguration serverNamesConfig = new DefaultConfiguration("servernames"); 38 serverNamesConfig.setAttribute("autodetect", false); 39 serverNamesConfig.addChild(Util.getValuedConfiguration("servername", "localhost")); 40 addChild(serverNamesConfig); 41 42 DefaultConfiguration inboxRepositoryConfig = new DefaultConfiguration("inboxRepository"); 43 44 DefaultConfiguration repositoryConfig = new DefaultConfiguration("repository"); 45 repositoryConfig.setAttribute("destinationURL", "db://maildb/inbox/"); 46 repositoryConfig.setAttribute("type", "MAIL"); 47 inboxRepositoryConfig.addChild(repositoryConfig); 48 49 addChild(inboxRepositoryConfig); 50 } 51 52 } 53 | Popular Tags |