* @param parent
* @param implClass
* @return the created contentdb-element
*/
public static Element addContentDB(Element parent, String implClass) {
DocumentFactory factory = DocumentFactory.getInstance();
Element database = factory.createElement("contentdb");
database.addAttribute("enabled", "true");
database.addAttribute("lazyconnect", "false");
Element elem = factory.createElement("type");
database.add(elem);
elem.add(factory.createText(implClass));
elem = factory.createElement("dbkey");
database.add(elem);
elem.add(factory.createText("(Enter database key here)"));
elem = factory.createElement("dbpath");
database.add(elem);
elem.add(factory.createText("(Enter database path here)"));
elem = factory.createElement("title");
database.add(elem);
elem = factory.createElement("domain");
database.add(elem);
elem.add(factory.createText("default"));
elem = factory.createElement("design");
database.add(elem);
elem.addAttribute("provider", "none");
elem.addAttribute("mode", "");
elem.addAttribute("key", "");
elem = factory.createElement("dboptions");
database.add(elem);
createDefaultDbOptions(elem);
elem = factory.createElement("publisheroptions");
database.add(elem);
createDefaultPublisherOptions(elem);
database.add(factory.createElement("storedqueries"));
database.add(factory.createElement("fieldmappings"));
Element cache = database.addElement("cache");
cache.addAttribute("path", "");
cache.addAttribute("type", "de.innovationgate.wgpublisher.cache.WGACacheHSQLDB");
cache.addAttribute("maxpages", "3000");
//lucene config per db
Element luceneDBConfig = factory.createElement("lucene");
luceneDBConfig.addAttribute("enabled", "false");
luceneDBConfig.addElement("itemrules");
LuceneIndexItemRule.addDefaultRule(luceneDBConfig);
luceneDBConfig.addElement("filerules");
LuceneIndexFileRule.addDefaultRule(luceneDBConfig);