Added the method 'getMapAccessURLToCatalogue' to DataCatalogueImpl

This commit is contained in:
Francesco Mangiacrapa 2019-11-12 17:42:01 +01:00
parent 33e299c7a1
commit edc1d8910e
1 changed files with 14 additions and 0 deletions

View File

@ -31,6 +31,7 @@ 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.DataCatalogueRunningCluster.ACCESS_LEVEL_TO_CATALOGUE_PORTLET;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.CatalogueUtilMethods;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.url.EntityContext;
import org.gcube.datacatalogue.ckanutillibrary.shared.CKanUserWrapper;
@ -103,6 +104,8 @@ public class DataCatalogueImpl implements DataCatalogue{
private final static String PATH_SET_PRIVATE_DATASET = "/api/3/action/bulk_update_private";
private final static String PATH_SET_PUBLIC_DATASET = "/api/3/action/bulk_update_public";
private static final String CATALOGUE_TAB_ENDING_URL = "/catalogue";
public Map<ACCESS_LEVEL_TO_CATALOGUE_PORTLET, String> mapAccessURLToCatalogue;
// ckan client
private SimpleExtendCkanClient client;
@ -142,6 +145,7 @@ public class DataCatalogueImpl implements DataCatalogue{
CKAN_DB_PORT = runningInstance.getDatabasePorts().get(0);
CKAN_CATALOGUE_URL = runningInstance.getDataCatalogueUrl().get(0).trim();
PORTLET_URL_FOR_SCOPE = runningInstance.getPortletUrl().trim();
mapAccessURLToCatalogue = runningInstance.getMapAccessURLToCatalogue();
MANAGE_PRODUCT_BUTTON = runningInstance.isManageProductEnabled();
URI_RESOLVER_URL = runningInstance.getUrlResolver();
SOCIAL_POST = runningInstance.isSocialPostEnabled();
@ -3022,5 +3026,15 @@ public class DataCatalogueImpl implements DataCatalogue{
public boolean isSocialPostEnabled() {
return SOCIAL_POST;
}
/**
* Gets the map access URL to catalogue.
*
* @return the map access URL to catalogue. For each {@link ACCESS_LEVEL_TO_CATALOGUE_PORTLET} contains the URL to the Catalogue Portlet
*/
public Map<ACCESS_LEVEL_TO_CATALOGUE_PORTLET, String> getMapAccessURLToCatalogue() {
return mapAccessURLToCatalogue;
}
}