dataminer-pool-manager/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ServiceConfiguration.java

149 lines
3.8 KiB
Java

package org.gcube.dataanalysis.dataminer.poolmanager.util;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
***REMOVED***
import java.util.Properties;
public class ServiceConfiguration {
public static String home = System.getProperty("user.home");
private Properties props;
public ServiceConfiguration() {
this(home+"/dataminer-pool-manager/dpmConfig/service.properties");
***REMOVED***
public ServiceConfiguration(String configFile) {
this.props = new Properties();
FileInputStream input;
try {
input = new FileInputStream(configFile);
***REMOVED*** loading properites from properties file
try {
props.load(input);
***REMOVED*** catch (IOException e) {
***REMOVED*** TODO Auto-generated catch block
e.printStackTrace();
***REMOVED***
***REMOVED*** catch (FileNotFoundException e1) {
***REMOVED*** TODO Auto-generated catch block
e1.printStackTrace();
***REMOVED***
***REMOVED***
public String getSVNRepository(){
return props.getProperty("svn.repository");
***REMOVED***
***REMOVED***RProto
public String getSVNRProtoAlgorithmsList(){
return props.getProperty("svn.rproto.algorithms-list");
***REMOVED***
public String getSVNRProtoLinuxCompiledDepsList(){
return props.getProperty("svn.rproto.deps-linux-compiled");
***REMOVED***
public String getSVNRProtoCRANDepsList(){
return props.getProperty("svn.rproto.deps-r");
***REMOVED***
public String getSVNRProtoPreInstalledDepsList(){
return props.getProperty("svn.rproto.deps-pre-installed");
***REMOVED***
public String getSVNRProtoRBDepsList(){
return props.getProperty("svn.rproto.deps-r-blackbox");
***REMOVED***
public String getSVNRProtoJavaDepsList(){
return props.getProperty("svn.rproto.deps-java");
***REMOVED***
public String getSVNRProtoKWDepsList(){
return props.getProperty("svn.rproto.deps-knime-workflow");
***REMOVED***
public String getSVNRProtoOctaveDepsList(){
return props.getProperty("svn.rproto.deps-octave");
***REMOVED***
public String getSVNRProtoPythonDepsList(){
return props.getProperty("svn.rproto.deps-python");
***REMOVED***
public String getSVNRProtoWCDepsList(){
return props.getProperty("svn.rproto.deps-windows-compiled");
***REMOVED***
***REMOVED***Prod
public String getSVNProdAlgorithmsList(){
return props.getProperty("svn.prod.algorithms-list");
***REMOVED***
public String getSVNRProdLinuxCompiledDepsList(){
return props.getProperty("svn.prod.deps-linux-compiled");
***REMOVED***
public String getSVNRProdCRANDepsList(){
return props.getProperty("svn.prod.deps-r");
***REMOVED***
public String getSVNRProdPreInstalledDepsList(){
return props.getProperty("svn.prod.deps-pre-installed");
***REMOVED***
public String getSVNRProdRBDepsList(){
return props.getProperty("svn.prod.deps-r-blackbox");
***REMOVED***
public String getSVNRProdJavaDepsList(){
return props.getProperty("svn.prod.deps-java");
***REMOVED***
public String getSVNRProdKWDepsList(){
return props.getProperty("svn.prod.deps-knime-workflow");
***REMOVED***
public String getSVNRProdOctaveDepsList(){
return props.getProperty("svn.prod.deps-octave");
***REMOVED***
public String getSVNRProdPythonDepsList(){
return props.getProperty("svn.prod.deps-python");
***REMOVED***
public String getSVNRProdWCDepsList(){
return props.getProperty("svn.prod.deps-windows-compiled");
***REMOVED***
public String getCSVUrl() {
return props.getProperty("HAPROXY_CSV");
***REMOVED***
public String getStagingHost() {
return props.getProperty("STAGING_HOST");
***REMOVED***
public static void main(String[] args) throws FileNotFoundException {
ServiceConfiguration a = new ServiceConfiguration();
System.out.println(a.getStagingHost());
System.out.println(a.getCSVUrl());
***REMOVED***
***REMOVED***