summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/Globals.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/Globals.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/Globals.java56
1 files changed, 2 insertions, 54 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/Globals.java b/src/main/java/org/openslx/satellitedaemon/Globals.java
index d75459b..fa39d2d 100644
--- a/src/main/java/org/openslx/satellitedaemon/Globals.java
+++ b/src/main/java/org/openslx/satellitedaemon/Globals.java
@@ -5,13 +5,8 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
-import java.security.KeyFactory;
-import java.security.KeyManagementException;
import java.security.KeyStore;
-import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.cert.CertificateException;
import java.util.Properties;
import javax.net.ssl.SSLContext;
@@ -19,7 +14,7 @@ import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import org.apache.log4j.Logger;
-import org.openslx.satellitedaemon.util.Util;
+import org.openslx.util.Util;
public class Globals
{
@@ -50,39 +45,14 @@ public class Globals
{
return properties.getProperty( "IMAGE_FOLDER" );
}
-
- public static String getProxyConf()
- {
- return properties.getProperty( "PROXY_CONF" );
- }
-
- public static String getProxyAddress()
- {
- return properties.getProperty( "PROXY_ADDR" );
- }
-
- public static String getProxyUsername()
- {
- return properties.getProperty( "PROXY_USERNAME" );
- }
-
- public static String getProxyPassword()
- {
- return properties.getProperty( "PROXY_PASSWORD" );
- }
// Integers //
public static int getThriftPort()
{
- return tryToParseInt( properties.getProperty( "THRIFT_PORT" ) );
+ return Util.tryToParseInt( properties.getProperty( "THRIFT_PORT" ) );
}
- public static int getProxyPort()
- {
- return tryToParseInt( properties.getProperty( "PROXY_PORT" ) );
- }
-
/**
* Load properties
*/
@@ -149,26 +119,4 @@ public class Globals
{
return context;
}
-
- /**
- * Tries to parse an int. Returns 0 on error.
- *
- * @param s
- * The string to parse
- * @return The parsed int or 0 on error
- */
- public static int tryToParseInt( String s )
- {
- try {
- return Integer.parseInt( s );
- } catch ( NumberFormatException e ) {
- return 0;
- }
- }
-
- public static boolean checkProxySettings() {
- return (
- (getProxyAddress() != "") &&
- (getProxyPort() != 0));
- }
}