1 package net.sf.mmapps.applications.developer; 2 3 import java.io.File; 4 import java.util.Properties; 5 import org.apache.commons.logging.*; 6 7 import net.sf.mmapps.modules.config.ApplicationConfigurations; 8 /*** 9 * 10 * @author Kees Jongenburger 11 * @version $Id: Project.java,v 1.2 2004/07/16 20:55:48 keesj Exp $ 12 */ 13 public class Project { 14 private static Log log = LogFactory.getLog(Project.class); 15 private Properties properties; 16 private ApplicationConfigurations applicationConfigurations; 17 18 public Project() { 19 properties = new Properties(); 20 String userHome = System.getProperty("user.home"); 21 log.info("USER HOME = " + userHome); 22 if (userHome != null) { 23 File file = new File(userHome); 24 File mmdeveloper = new File(file, ".mmdeveloper"); 25 if (!mmdeveloper.exists()) { 26 mmdeveloper.mkdir(); 27 } 28 properties.setProperty("home",mmdeveloper.getPath()); 29 } 30 } 31 32 public Properties getProperties() { 33 return properties; 34 } 35 36 public String getProperty(String name) { 37 return properties.getProperty(name); 38 } 39 40 public String getProperty(String name, String defaultValue) { 41 return properties.getProperty(name, defaultValue); 42 } 43 44 public void setProperty(String name, String value) { 45 properties.setProperty(name, value); 46 } 47 }