patched the method getPortletURL in order to ignore the URL overriding in case of Infrastructure SCOPE, it returns the PORTLET URL read from Ckan-Portlet at INFRASTRUCTURE level
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@179443 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
63e93dd4d7
commit
0e7f08de7c
|
@ -30,6 +30,7 @@ import org.apache.solr.client.solrj.response.FacetField;
|
|||
import org.apache.solr.client.solrj.response.FacetField.Count;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.server.utils.CatalogueUtilMethods;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.server.utils.url.EntityContext;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.shared.CKanUserWrapper;
|
||||
|
@ -180,6 +181,12 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
|
||||
//PATCHED By Francesco
|
||||
ScopeBean context = new ScopeBean(CONTEXT);
|
||||
|
||||
if(context.is(Type.INFRASTRUCTURE)) {
|
||||
logger.info("Working with the {} scope returning the path read from GR 'Ckan-Porltet': {}", Type.INFRASTRUCTURE.toString(), PORTLET_URL_FOR_SCOPE);
|
||||
return PORTLET_URL_FOR_SCOPE;
|
||||
}
|
||||
|
||||
String vreNameLower = context.name().toLowerCase();
|
||||
//CHECKING IF THE PORTLET URL CONTAINS THE VRE NAME INTO URL
|
||||
if(PORTLET_URL_FOR_SCOPE.toLowerCase().contains(vreNameLower)){
|
||||
|
|
Loading…
Reference in New Issue