Loading data-discovery/config/discovery.properties.in +0 −3 Original line number Diff line number Diff line Loading @@ -6,7 +6,4 @@ #db_user_name=vialactea #db_password=IA2lbt09 # obs_publisher_did (FIXME used only in (Db)AuthPolicy while database access to convert between legacy pubdid and ivoid) #ivoid_authority=ia2.inaf.it #ivoid_resource_key=vlkb/datasets data-discovery/src/main/java/vlkb/webapi/AuthorizationResponseSettings.java +2 −39 Original line number Diff line number Diff line Loading @@ -30,31 +30,7 @@ class AuthorizationResponseSettings } } public static class ServiceUrls { private String cutoutUrl; private String mergeUrl; private String surveysAbsPathname; public boolean cutoutUrlIsSet() { return (cutoutUrl != null) && cutoutUrl.trim().isEmpty(); } public boolean mergeUrlIsSet() { return (mergeUrl != null) && mergeUrl.trim().isEmpty(); } public boolean surveysAbsPathnameIsSet() { return (surveysAbsPathname != null) && surveysAbsPathname.trim().isEmpty(); } public String cutoutUrl() {return cutoutUrl;} public String mergeUrl() {return mergeUrl;} public String surveysAbsPathname() {return surveysAbsPathname;} public String toString() { return cutoutUrl + " " + mergeUrl + " " + surveysAbsPathname; } } public DBConn dbConn; public ServiceUrls serviceUrls; // will not start without config-file; no reasonable code-defaults can be invented Loading @@ -70,9 +46,8 @@ class AuthorizationResponseSettings properties.load(ins); DBConn dbConn = loadDBConn(properties); ServiceUrls serviceUrls = loadServiceUrls(properties); return new AuthorizationResponseSettings(dbConn, serviceUrls); return new AuthorizationResponseSettings(dbConn); } else { Loading @@ -89,10 +64,9 @@ class AuthorizationResponseSettings private AuthorizationResponseSettings(DBConn dbConn, ServiceUrls serviceUrls) private AuthorizationResponseSettings(DBConn dbConn) { this.dbConn = dbConn; this.serviceUrls = serviceUrls; } Loading @@ -107,16 +81,5 @@ class AuthorizationResponseSettings return dbConn; } private static ServiceUrls loadServiceUrls(Properties properties) { ServiceUrls serviceUrls = new ServiceUrls(); serviceUrls.cutoutUrl = properties.getProperty("cutout_url","").strip(); serviceUrls.mergeUrl = properties.getProperty("merge_url","").strip(); serviceUrls.surveysAbsPathname = properties.getProperty("surveys_metadata_abs_pathname","/srv/surveys/surveys_metadata.csv").strip(); return serviceUrls; } } Loading
data-discovery/config/discovery.properties.in +0 −3 Original line number Diff line number Diff line Loading @@ -6,7 +6,4 @@ #db_user_name=vialactea #db_password=IA2lbt09 # obs_publisher_did (FIXME used only in (Db)AuthPolicy while database access to convert between legacy pubdid and ivoid) #ivoid_authority=ia2.inaf.it #ivoid_resource_key=vlkb/datasets
data-discovery/src/main/java/vlkb/webapi/AuthorizationResponseSettings.java +2 −39 Original line number Diff line number Diff line Loading @@ -30,31 +30,7 @@ class AuthorizationResponseSettings } } public static class ServiceUrls { private String cutoutUrl; private String mergeUrl; private String surveysAbsPathname; public boolean cutoutUrlIsSet() { return (cutoutUrl != null) && cutoutUrl.trim().isEmpty(); } public boolean mergeUrlIsSet() { return (mergeUrl != null) && mergeUrl.trim().isEmpty(); } public boolean surveysAbsPathnameIsSet() { return (surveysAbsPathname != null) && surveysAbsPathname.trim().isEmpty(); } public String cutoutUrl() {return cutoutUrl;} public String mergeUrl() {return mergeUrl;} public String surveysAbsPathname() {return surveysAbsPathname;} public String toString() { return cutoutUrl + " " + mergeUrl + " " + surveysAbsPathname; } } public DBConn dbConn; public ServiceUrls serviceUrls; // will not start without config-file; no reasonable code-defaults can be invented Loading @@ -70,9 +46,8 @@ class AuthorizationResponseSettings properties.load(ins); DBConn dbConn = loadDBConn(properties); ServiceUrls serviceUrls = loadServiceUrls(properties); return new AuthorizationResponseSettings(dbConn, serviceUrls); return new AuthorizationResponseSettings(dbConn); } else { Loading @@ -89,10 +64,9 @@ class AuthorizationResponseSettings private AuthorizationResponseSettings(DBConn dbConn, ServiceUrls serviceUrls) private AuthorizationResponseSettings(DBConn dbConn) { this.dbConn = dbConn; this.serviceUrls = serviceUrls; } Loading @@ -107,16 +81,5 @@ class AuthorizationResponseSettings return dbConn; } private static ServiceUrls loadServiceUrls(Properties properties) { ServiceUrls serviceUrls = new ServiceUrls(); serviceUrls.cutoutUrl = properties.getProperty("cutout_url","").strip(); serviceUrls.mergeUrl = properties.getProperty("merge_url","").strip(); serviceUrls.surveysAbsPathname = properties.getProperty("surveys_metadata_abs_pathname","/srv/surveys/surveys_metadata.csv").strip(); return serviceUrls; } }