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

76 lines
1.9 KiB
Java

package org.gcube.dataanalysis.dataminer.poolmanager.util;
***REMOVED***
import java.util.Properties;
public class Props {
public static String home = System.getProperty("user.home");
public Props() {
***REMOVED***
public String getCSVUrl() {
Properties props = new Properties();
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
***REMOVED*** loading properites from properties file
try {
props.load(input);
***REMOVED*** catch (IOException e) {
***REMOVED*** TODO Auto-generated catch block
e.printStackTrace();
***REMOVED***
***REMOVED*** reading proeprty
String path = props.getProperty("HAPROXY_CSV");
return path;
***REMOVED***
public String getSVNrepo() {
Properties props = new Properties();
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
***REMOVED*** loading properites from properties file
try {
props.load(input);
***REMOVED*** catch (IOException e) {
***REMOVED*** TODO Auto-generated catch block
e.printStackTrace();
***REMOVED***
***REMOVED*** reading proeprty
String path = props.getProperty("SVN_REPO");
return path;
***REMOVED***
public String getStagingHost() {
Properties props = new Properties();
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
***REMOVED*** loading properites from properties file
try {
props.load(input);
***REMOVED*** catch (IOException e) {
***REMOVED*** TODO Auto-generated catch block
e.printStackTrace();
***REMOVED***
***REMOVED*** reading proeprty
String path = props.getProperty("STAGING_HOST");
return path;
***REMOVED***
public static void main(String[] args) {
***REMOVED***Props a = new Props();
System.out.println(new Props().getSVNrepo());
***REMOVED***System.out.println(a.getStagingHost());
***REMOVED***
***REMOVED***