summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/Globals.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/Globals.java')
-rw-r--r--src/main/java/org/openslx/imagemaster/Globals.java49
1 files changed, 19 insertions, 30 deletions
diff --git a/src/main/java/org/openslx/imagemaster/Globals.java b/src/main/java/org/openslx/imagemaster/Globals.java
index 3eca269..8fff2d2 100644
--- a/src/main/java/org/openslx/imagemaster/Globals.java
+++ b/src/main/java/org/openslx/imagemaster/Globals.java
@@ -47,20 +47,18 @@ public class Globals
|| getLdapKeystorePassword().isEmpty()
|| getLdapKeystorePath() == null
|| getLdapKeystorePath().isEmpty()
- || getFtpBaseDir() == null
- || getFtpBaseDir().isEmpty()
- || getFtpKeystoreFile() == null
- || getFtpKeystoreFile().isEmpty()
- || getFtpKeystoreAlias() == null
- || getFtpKeystoreAlias().isEmpty()
- || getFtpKeystorePassword() == null
- || getFtpKeystorePassword().isEmpty()
+ || getSslKeystoreFile() == null
+ || getSslKeystoreFile().isEmpty()
+ || getSslKeystoreAlias() == null
+ || getSslKeystoreAlias().isEmpty()
+ || getSslKeystorePassword() == null
+ || getSslKeystorePassword().isEmpty()
|| getLdapPort() == 0
|| getSessionTimeoutUser() == 0
|| getSessionTimeoutServer() == 0
- || getFtpPort() == 0
- || getFtpTimeout() == 0 ) {
+ || getSslPort() == 0
+ || getSslTimeout() == 0 ) {
return false;
}
@@ -77,17 +75,12 @@ public class Globals
}
// check keystore
- if ( !getFtpKeystoreFile().endsWith( ".jks" )) {
+ if ( !getSslKeystoreFile().endsWith( ".jks" )) {
log.error( "Keystore is not in jks format." );
return false;
}
// remove "/" at the end of the paths
- String ftp = getFtpBaseDir();
- if ( ftp.endsWith( "/" ) ) {
- Globals.properties.put( "ftp_base_dir", ftp.substring( 0, ftp.length() - 1 ) );
- }
-
String image = getImageDir();
if ( image.endsWith( "/" ) ) {
Globals.properties.put( "image_dir", image.substring( 0, image.length() - 1 ) );
@@ -110,12 +103,12 @@ public class Globals
return Integer.valueOf( properties.getProperty( "session_timeout_user" ) );
}
- public static int getFtpPort() {
- return Integer.valueOf( properties.getProperty( "ftp_port" ) );
+ public static int getSslPort() {
+ return Integer.valueOf( properties.getProperty( "ssl_port" ) );
}
- public static int getFtpTimeout() {
- return Integer.valueOf( properties.getProperty( "ftp_timeout" ) );
+ public static int getSslTimeout() {
+ return Integer.valueOf( properties.getProperty( "ssl_timeout" ) );
}
/* STRINGS */
@@ -124,16 +117,16 @@ public class Globals
return properties.getProperty( "image_dir" );
}
- public static String getFtpKeystoreFile() {
- return properties.getProperty( "ftp_keystore_file" );
+ public static String getSslKeystoreFile() {
+ return properties.getProperty( "ssl_keystore_file" );
}
- public static String getFtpKeystoreAlias() {
- return properties.getProperty( "ftp_keystore_alias" );
+ public static String getSslKeystoreAlias() {
+ return properties.getProperty( "ssl_keystore_alias" );
}
- public static String getFtpKeystorePassword() {
- return properties.getProperty( "ftp_keystore_password" );
+ public static String getSslKeystorePassword() {
+ return properties.getProperty( "ssl_keystore_password" );
}
public static String getLdapHost() {
@@ -160,10 +153,6 @@ public class Globals
return properties.getProperty( "ldap_keystore_path" );
}
- public static String getFtpBaseDir() {
- return properties.getProperty( "ftp_base_dir" );
- }
-
/* BOOLEANS */
public static boolean getLdapSsl() {