airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1431625 - in /airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils: ApplicationSettings.java ServerSettings.java
Date Thu, 10 Jan 2013 20:41:45 GMT
Author: samindaw
Date: Thu Jan 10 20:41:45 2013
New Revision: 1431625

URL: http://svn.apache.org/viewvc?rev=1431625&view=rev
Log:
refactor

Modified:
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java?rev=1431625&r1=1431624&r2=1431625&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
(original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
Thu Jan 10 20:41:45 2013
@@ -38,11 +38,7 @@ public abstract class ApplicationSetting
     public static final String CLIENT_PROPERTIES="airavata-client.properties";
 	private static Properties properties = new Properties();
     private static Exception propertyLoadException;
-    private static final String DEFAULT_GATEWAY_ID="gateway.id";
-    private static final String SYSTEM_USER="system.user";
-    private static final String SYSTEM_USER_PASSWORD="system.password";
-    private static final String SYSTEM_USER_GATEWAY="system.gateway";
-    private static final String TOMCAT_PORT = "port";
+
     private final static Logger logger = LoggerFactory.getLogger(ApplicationSettings.class);
 
     static{
@@ -107,26 +103,6 @@ public abstract class ApplicationSetting
 		return defaultValue;
     }
     
-    public static String getDefaultGatewayId()throws ApplicationSettingsException{
-    	return getSetting(DEFAULT_GATEWAY_ID);
-    }
-    
-    public static String getSystemUser() throws ApplicationSettingsException{
-    	return getSetting(SYSTEM_USER);
-    }
-    
-    public static String getSystemUserPassword() throws ApplicationSettingsException{
-    	return getSetting(SYSTEM_USER_PASSWORD);
-    }
-    
-    public static String getSystemUserGateway() throws ApplicationSettingsException{
-    	return getSetting(SYSTEM_USER_GATEWAY);
-    }
-
-    public static String getTomcatPort() throws ApplicationSettingsException {
-        return getSetting(TOMCAT_PORT);
-    }
-
     public static void setSetting(String key, String value) throws ApplicationSettingsException{
     	properties.setProperty(key, value);
     	saveProperties();

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java?rev=1431625&r1=1431624&r2=1431625&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
(original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
Thu Jan 10 20:41:45 2013
@@ -21,6 +21,33 @@
 
 package org.apache.airavata.common.utils;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+
 
 public class ServerSettings extends ApplicationSettings{
+    private static final String DEFAULT_GATEWAY_ID="gateway.id";
+    private static final String SYSTEM_USER="system.user";
+    private static final String SYSTEM_USER_PASSWORD="system.password";
+    private static final String SYSTEM_USER_GATEWAY="system.gateway";
+    private static final String TOMCAT_PORT = "port";
+    
+	public static String getDefaultGatewayId()throws ApplicationSettingsException{
+    	return getSetting(DEFAULT_GATEWAY_ID);
+    }
+    
+    public static String getSystemUser() throws ApplicationSettingsException{
+    	return getSetting(SYSTEM_USER);
+    }
+    
+    public static String getSystemUserPassword() throws ApplicationSettingsException{
+    	return getSetting(SYSTEM_USER_PASSWORD);
+    }
+    
+    public static String getSystemUserGateway() throws ApplicationSettingsException{
+    	return getSetting(SYSTEM_USER_GATEWAY);
+    }
+
+    public static String getTomcatPort() throws ApplicationSettingsException {
+        return getSetting(TOMCAT_PORT);
+    }
 }



Mime
View raw message