1 17 18 19 20 package org.apache.lenya.cms.rc; 21 22 import java.util.Properties ; 23 24 import org.apache.log4j.Category; 25 26 27 30 public class Configuration { 31 private static Category log = Category.getInstance(Configuration.class); 32 33 private String rcmlDirectory = null; 34 private String backupDirectory = null; 35 36 39 public Configuration() { 40 String propertiesFileName = "conf.properties"; 41 Properties properties = new Properties (); 42 43 try { 44 properties.load(Configuration.class.getResourceAsStream(propertiesFileName)); 45 } catch (Exception e) { 46 log.fatal(": Failed to load properties from resource: " + propertiesFileName); 47 } 48 49 rcmlDirectory = properties.getProperty("rcmlDirectory"); 50 backupDirectory = properties.getProperty("backupDirectory"); 51 } 52 53 58 public String getBackupDirectory() { 59 return backupDirectory; 60 } 61 62 67 public String getRcmlDirectory() { 68 return rcmlDirectory; 69 } 70 } 71 | Popular Tags |