minor fix
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@131217 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
51ae09387d
commit
5ce7b9899b
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.datacatalogue.ckanutillibrary.utils;
|
||||
package org.gcube.datacatalogue.ckanutillibrary;
|
||||
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.client;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import org.xml.sax.InputSource;
|
|||
/**
|
||||
* This class has a method that tries to read the application profile whose structure contains
|
||||
* couples Scope/Current_Url to check where the the needed information needs to be discovered according to the current
|
||||
* portlet url
|
||||
* portlet url. It means that the scope in which the ckan related information will be discovered could be different wrt the running one.
|
||||
* @author Costantino Perciante at ISTI-CNR
|
||||
* (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
|
@ -47,7 +47,6 @@ public class ApplicationProfileScopePerUrlReader {
|
|||
throw new IllegalArgumentException();
|
||||
|
||||
String scopeToReturn = null;
|
||||
|
||||
String scope = ScopeProvider.instance.get();
|
||||
String rootScopeForInfrastructure = "/" + PortalContext.getConfiguration().getInfrastructureName();
|
||||
|
|
@ -11,7 +11,6 @@ import org.gcube.datacatalogue.ckanutillibrary.models.CKanUserWrapper;
|
|||
import org.gcube.datacatalogue.ckanutillibrary.models.CkanDatasetRelationship;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.models.DatasetRelationships;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.models.RolesIntoOrganization;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.utils.ApplicationProfileScopePerUrlReader;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import eu.trentorise.opendata.jackan.model.CkanOrganization;
|
||||
|
@ -169,5 +168,10 @@ public class TestCKanLib {
|
|||
String url = "https://dev4.d4science.org/group/devvre/ckan";
|
||||
String scopeToUse = new ApplicationProfileScopePerUrlReader().getScopePerUrl(url);
|
||||
logger.debug("Retrieved scope is " + scopeToUse);
|
||||
|
||||
ScopeProvider.instance.reset(); // the sysout should print null
|
||||
String url2 = "https://dev4.d4science.org/group/devvre/ckan";
|
||||
String scopeToUse2 = new ApplicationProfileScopePerUrlReader().getScopePerUrl(url2);
|
||||
logger.debug("Retrieved scope is " + scopeToUse2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue