Skip to content
Snippets Groups Projects
Commit d840105e authored by Robert Butora's avatar Robert Butora
Browse files

config: removes obsolete unused serviceUrls from AuthorizationFilter settings

parent 643ebe34
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
......@@ -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
{
......@@ -89,10 +64,9 @@ class AuthorizationResponseSettings
private AuthorizationResponseSettings(DBConn dbConn, ServiceUrls serviceUrls)
private AuthorizationResponseSettings(DBConn dbConn)
{
this.dbConn = dbConn;
this.serviceUrls = serviceUrls;
}
......@@ -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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment