Fixing a check for public VRE Portlet URL
This commit is contained in:
parent
0b31dcbeeb
commit
40359851ac
|
@ -52,7 +52,7 @@ public class CkanCatalogueConfigurationsReader {
|
|||
|
||||
|
||||
/**
|
||||
* Load catalogue end points.
|
||||
* Load catalogue end points through the ckan-util-library
|
||||
*
|
||||
* @return the gateway ckan catalogue reference
|
||||
* @throws Exception the exception
|
||||
|
@ -73,7 +73,7 @@ public class CkanCatalogueConfigurationsReader {
|
|||
links.setPublicGatewayPortletURL(publicGatewayPortletURL);
|
||||
|
||||
try{
|
||||
|
||||
//If a catalogue gateway portlet URL is not provided/read from GR, building it
|
||||
if(publicGatewayPortletURL==null || publicGatewayPortletURL.isEmpty()) {
|
||||
//Building the gateway catalogue public URL from private VRE Portlet URL
|
||||
URI toURL = new URI(privatePortletURL);
|
||||
|
|
|
@ -225,7 +225,12 @@ public class CatalogueResolver {
|
|||
|
||||
String publicGatewayPorltetURL = String.format("%s?path=/%s/%s",ckanCatalogueReference.getPublicGatewayPortletURL(),entityContextValue, entityName);
|
||||
String privateVREPortletURL = String.format("%s?path=/%s/%s",ckanCatalogueReference.getPrivateVREPortletURL(),entityContextValue, entityName);
|
||||
String publicVREPortletURL = String.format("%s?path=/%s/%s",ckanCatalogueReference.getPublicVREPortletURL(),entityContextValue, entityName);
|
||||
//Checking if the public VRE portlet URL is available (so it was read from GR)
|
||||
String publicVREPortletURL = null;
|
||||
if(ckanCatalogueReference.getPublicVREPortletURL()!=null && !ckanCatalogueReference.getPublicVREPortletURL().isEmpty()) {
|
||||
//here the catalogue is available/deployed as public at VRE level
|
||||
publicVREPortletURL = String.format("%s?path=/%s/%s",ckanCatalogueReference.getPublicVREPortletURL(),entityContextValue, entityName);
|
||||
}
|
||||
return new ItemCatalogueURLs(entityName, isPublicItem, privateVREPortletURL, publicVREPortletURL, publicGatewayPorltetURL);
|
||||
}catch (Exception e) {
|
||||
logger.error("Error when resolving CatalogueURL:", e);
|
||||
|
|
Loading…
Reference in New Issue