Patched the method DataCatalogueImpl#gePortletUrl

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@174068 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-11-09 10:35:22 +00:00
parent ed288fcda2
commit 0dc39399dd
3 changed files with 39 additions and 23 deletions

View File

@ -2,7 +2,7 @@
<!DOCTYPE xml>
<ReleaseNotes>
<Changeset component="org.gcube.data-catalogue.ckan-util-library.2-8-0" date="${buildDate}">
<Change></Change>
<Change>Patched method DataCatalogueImpl#getPortletURL</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.ckan-util-library.2-7-0" date="2018-10-10">
<Change>Added the possibility to deny social post on catalogue-ws #12514</Change>

View File

@ -172,10 +172,26 @@ public class DataCatalogueImpl implements DataCatalogue{
@Override
public String getPortletUrl() {
/*
ScopeBean context = new ScopeBean(CONTEXT);
String buildedUrl = PORTLET_URL_FOR_SCOPE.endsWith("/") ? PORTLET_URL_FOR_SCOPE : PORTLET_URL_FOR_SCOPE + "/";
buildedUrl += context.name().toLowerCase() + CATALOGUE_TAB_ENDING_URL;
return buildedUrl;
*/
//PATCHED By Francesco
ScopeBean context = new ScopeBean(CONTEXT);
//CHECKING IF THE PORTLET URL CONTAINS THE VRE NAME INTO URL
if(PORTLET_URL_FOR_SCOPE.contains(context.name())){
//THE PORLTET URL READ FROM GENERIC RESOUCE 'CkanPortlet' SHOULD BE ALREADY VALID
return PORTLET_URL_FOR_SCOPE;
}else{
//ADDING VRE NAME AND THE SUFFIX 'CATALOGUE_TAB_ENDING_URL' TO URL
String buildedUrl = PORTLET_URL_FOR_SCOPE.endsWith("/") ? PORTLET_URL_FOR_SCOPE : PORTLET_URL_FOR_SCOPE + "/";
buildedUrl += context.name().toLowerCase() + CATALOGUE_TAB_ENDING_URL;
return buildedUrl;
}
}
@Override

View File

@ -170,7 +170,7 @@ public class DataCatalogueRunningCluster {
Iterator<AccessPoint> accessPointIterator = res.profile().accessPoints().iterator();
while (accessPointIterator.hasNext()) {
ServiceEndpoint.AccessPoint accessPoint = (ServiceEndpoint.AccessPoint) accessPointIterator
ServiceEndpoint.AccessPoint accessPoint = accessPointIterator
.next();
// get the is master property
@ -215,7 +215,7 @@ public class DataCatalogueRunningCluster {
Iterator<AccessPoint> accessPointIterator = res.profile().accessPoints().iterator();
while (accessPointIterator.hasNext()) {
ServiceEndpoint.AccessPoint accessPoint = (ServiceEndpoint.AccessPoint) accessPointIterator
ServiceEndpoint.AccessPoint accessPoint = accessPointIterator
.next();
// add this host
@ -295,7 +295,7 @@ public class DataCatalogueRunningCluster {
Iterator<AccessPoint> accessPointIterator = res.profile().accessPoints().iterator();
while (accessPointIterator.hasNext()) {
ServiceEndpoint.AccessPoint accessPoint = (ServiceEndpoint.AccessPoint) accessPointIterator
ServiceEndpoint.AccessPoint accessPoint = accessPointIterator
.next();
// get the is master property
@ -336,7 +336,7 @@ public class DataCatalogueRunningCluster {
Iterator<AccessPoint> accessPointIterator = res.profile().accessPoints().iterator();
while (accessPointIterator.hasNext()) {
ServiceEndpoint.AccessPoint accessPoint = (ServiceEndpoint.AccessPoint) accessPointIterator
ServiceEndpoint.AccessPoint accessPoint = accessPointIterator
.next();
// add this host