Removed code which get properties no more needed

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@148243 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-05-02 15:00:33 +00:00
parent 5bf6d4777b
commit ea2c1392bd
1 changed files with 1 additions and 22 deletions

View File

@ -29,12 +29,6 @@ public class DatabaseEnvironment {
protected static final String REMOTE_PROTOCOL;
protected static final String REMOTE_PROTOCOL_VARNAME = "REMOTE_PROTOCOL";
protected static final String HTTP_PROTOCOL;
protected static final String HTTP_PROTOCOL_VARNAME = "HTTP_PROTOCOL";
protected static final String HTTP_PORT;
protected static final String HTTP_PORT_VARNAME = "HTTP_PORT";
public static final String DB;
protected static final String DB_VARNAME = "DB";
@ -66,16 +60,11 @@ public class DatabaseEnvironment {
public static final Map<PermissionMode, String> DEFAULT_PASSWORDS;
protected static final String HOSTS;
protected static final String[] HOST_ARRAY;
public static final String SERVER_URI;
public static final String DB_URI;
public static final String[] HTTP_URL_STRINGS;
static {
Properties properties = new Properties();
InputStream input = null;
@ -91,9 +80,6 @@ public class DatabaseEnvironment {
REMOTE_PROTOCOL = properties.getProperty(REMOTE_PROTOCOL_VARNAME);
HTTP_PROTOCOL = properties.getProperty(HTTP_PROTOCOL_VARNAME);
HTTP_PORT = properties.getProperty(HTTP_PORT_VARNAME);
DB = properties.getProperty(DB_VARNAME);
SERVER_URI = REMOTE_PROTOCOL + HOSTS;
DB_URI = SERVER_URI + "/" + DB;
@ -135,13 +121,6 @@ public class DatabaseEnvironment {
DEFAULT_PASSWORDS.put(PermissionMode.READER, DEFAULT_CREATED_READER_USER_PASSWORD);
HOST_ARRAY = HOSTS.split(";");
HTTP_URL_STRINGS = new String[HOST_ARRAY.length];
for(int i=0; i<HOST_ARRAY.length; i++){
HTTP_URL_STRINGS[i] = HTTP_PROTOCOL + HOST_ARRAY[i] + HTTP_PORT;
}
} catch(Exception e){
logger.error("Unable to load properties from {}", PROPERTY_FILENAME);
throw new RuntimeException("Unable to load properties", e);