removed getGeonetworkCachedServerParameters from HTTP GET

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@130796 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-07-25 17:26:07 +00:00
parent 78a492e843
commit 44eeedec96
2 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,7 @@ public interface GeonetworkServiceInterface {
/**
* Gets the geonetwork instance.
* Gets the geonetwork instance with authenticate = false and LoginLevel = null
*
* @return the geonetwork instance
* @throws Exception the exception

View File

@ -137,13 +137,17 @@ public class GeonetworkResolver extends HttpServlet{
logger.info("SCOPE: " + scopeValue +", Query String: " + req.getQueryString());
try {
ServerParameters geonetworkParams = getGeonetworkCachedServerParameters(scopeValue);
// ServerParameters geonetworkParams = getGeonetworkCachedServerParameters(scopeValue);
GeonetworkServiceInterface gntwAccess = new GeonetworkAccessParameter(scopeValue, null);
GeonetworkInstance gnInstance = gntwAccess.getGeonetworkInstance();
HTTPCallsUtils httpUtils = new HTTPCallsUtils();
Configuration config = gnInstance.getGeonetworkPublisher().getConfiguration();
String geonetworkUrl = config.getGeoNetworkEndpoint();
// boolean authorized = GNAuthentication.login(httpUtils, geonetworkParams.getUrl(), geonetworkParams.getUser(), geonetworkParams.getPassword());
// logger.trace("Authorized on "+geonetworkParams +" ? "+authorized);
String newQueryString = purgeScopeFromQueryString(scopeValue, req.getQueryString());
logger.trace("Purged query string from "+scopeValue+" is: "+newQueryString);
String baseURL = remainValue==null ||remainValue.isEmpty()?geonetworkParams.getUrl()+"/"+CSW_SERVER:geonetworkParams.getUrl()+"/"+CSW_SERVER+remainValue;
String baseURL = remainValue==null ||remainValue.isEmpty()?geonetworkUrl+"/"+CSW_SERVER:geonetworkUrl+"/"+CSW_SERVER+remainValue;
logger.trace("New base URL "+baseURL);
newQueryString = purgeRemainFromQueryString(remainValue, newQueryString);
logger.trace("Purged query string from "+remainValue+" is: "+newQueryString);