Merged manually with branch task_20650
This commit is contained in:
parent
3527ad4ea5
commit
f80dd30448
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.1.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/gcube-ckan-datacatalog-2.1.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/gcube-ckan-datacatalog-2.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -36,5 +36,5 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.1.1-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.2.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
>>>>>>>=refs/heads/task_20699
|
>>>>>>>=refs/heads/task_20699
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.1.1-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.2.0-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,8 +10,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="gcube-ckan-datacatalog-2.1.1-SNAPSHOT">
|
|
||||||
|
<wb-module deploy-name="gcube-ckan-datacatalog-2.2.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +25,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +38,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +51,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +64,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +77,8 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +90,8 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +103,8 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,13 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [v2.1.2-SNAPSHOT] - 2022-02-03
|
## [v2.2.0-SNAPSHOT] - 2022-0-18
|
||||||
|
|
||||||
- Just to include the fix #22889
|
#### Enhancements
|
||||||
|
|
||||||
|
- [#20650] Data Catalogue: integrate the Content Moderator System
|
||||||
|
- [#22872] Updated the AppId (to 'service-account-gcat') used in the "Catalogue" GR
|
||||||
|
- [#23259] Implemented the requirement described in #23156
|
||||||
|
|
||||||
## [v2.1.1] - 2022-01-21
|
## [v2.1.1] - 2022-01-21
|
||||||
|
|
||||||
|
|
34
pom.xml
34
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
<groupId>org.gcube.portlets.gcubeckan</groupId>
|
<groupId>org.gcube.portlets.gcubeckan</groupId>
|
||||||
<artifactId>gcube-ckan-datacatalog</artifactId>
|
<artifactId>gcube-ckan-datacatalog</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.2.0-SNAPSHOT</version>
|
||||||
<name>gCube CKAN Data Catalog</name>
|
<name>gCube CKAN Data Catalog</name>
|
||||||
<description>The gCube CKAN Data Catalog portlet</description>
|
<description>The gCube CKAN Data Catalog portlet</description>
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>maven-portal-bom</artifactId>
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
|
@ -64,12 +64,31 @@
|
||||||
<!-- <artifactId>xercesImpl</artifactId> -->
|
<!-- <artifactId>xercesImpl</artifactId> -->
|
||||||
<!-- <version>2.9.1</version> -->
|
<!-- <version>2.9.1</version> -->
|
||||||
<!-- </dependency> -->
|
<!-- </dependency> -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>xml-apis</groupId>
|
||||||
|
<artifactId>xml-apis</artifactId>
|
||||||
|
<version>1.4.01</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-user</artifactId>
|
<artifactId>gwt-user</artifactId>
|
||||||
<scope>provided</scope>
|
|
||||||
<!-- <scope>compile</scope> -->
|
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.gwt</groupId>
|
||||||
|
<artifactId>gwt-dev</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.gwt</groupId>
|
||||||
|
<artifactId>gwt-servlet</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.gwtbootstrap</groupId>
|
<groupId>com.github.gwtbootstrap</groupId>
|
||||||
|
@ -101,6 +120,11 @@
|
||||||
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
<artifactId>ckan-content-moderator-widget</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
@ -114,7 +138,7 @@
|
||||||
<version>[2.0.0-SNAPSHOT,3.0.0)</version>
|
<version>[2.0.0-SNAPSHOT,3.0.0)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>ckan2zenodo-publisher-widget</artifactId>
|
<artifactId>ckan2zenodo-publisher-widget</artifactId>
|
||||||
|
|
|
@ -14,24 +14,32 @@
|
||||||
<!-- Other module inherits -->
|
<!-- Other module inherits -->
|
||||||
<inherits name="com.google.gwt.json.JSON" />
|
<inherits name="com.google.gwt.json.JSON" />
|
||||||
<!-- Inherits widget -->
|
<!-- Inherits widget -->
|
||||||
|
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||||
|
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
|
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
||||||
<inherits name='org.gcube.datacatalogue.grsf_manage_widget.GRSFManageWidget' />
|
<inherits
|
||||||
<inherits name='org.gcube.datacatalogue.utillibrary.CkanUtilLibrary' />
|
name='org.gcube.datacatalogue.grsf_manage_widget.GRSFManageWidget' />
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
<inherits
|
||||||
|
name='org.gcube.datacatalogue.utillibrary.CkanUtilLibrary' />
|
||||||
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
<inherits
|
||||||
<inherits name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
|
<inherits
|
||||||
<!-- Specify the app entry point class. -->
|
name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
||||||
<entry-point class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
<inherits
|
||||||
|
name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
||||||
|
<inherits
|
||||||
|
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Specify the app entry point class. -->
|
||||||
|
<entry-point
|
||||||
|
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
|
@ -4,6 +4,9 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client;
|
||||||
import org.gcube.datacatalogue.grsf_manage_widget.client.events.HideManagementPanelEvent;
|
import org.gcube.datacatalogue.grsf_manage_widget.client.events.HideManagementPanelEvent;
|
||||||
import org.gcube.datacatalogue.grsf_manage_widget.client.events.HideManagementPanelEventHandler;
|
import org.gcube.datacatalogue.grsf_manage_widget.client.events.HideManagementPanelEventHandler;
|
||||||
import org.gcube.datacatalogue.grsf_manage_widget.client.view.ManageProductWidget;
|
import org.gcube.datacatalogue.grsf_manage_widget.client.view.ManageProductWidget;
|
||||||
|
import org.gcube.datacatalogue.utillibrary.shared.ItemStatus;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ClickedCMSManageProductButtonEvent;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ClickedCMSManageProductButtonEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEventHandler;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
||||||
|
@ -32,6 +35,10 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view.GCubeCkanDa
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZendoPublisherWidget;
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZendoPublisherWidget;
|
||||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.CatalogueItem;
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.CatalogueItem;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorCheckConfigs;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorWidgetTrusted;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.ContentModeratorWidgetConstants;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.shared.DISPLAY_FIELD;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.CreateDatasetForm;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.CreateDatasetForm;
|
||||||
import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget;
|
import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget;
|
||||||
|
|
||||||
|
@ -51,7 +58,7 @@ public class CkanEventHandlerManager {
|
||||||
|
|
||||||
protected static final String WIDGET_CREATE_TITLE = "Publish Item";
|
protected static final String WIDGET_CREATE_TITLE = "Publish Item";
|
||||||
private HandlerManager eventBus = new HandlerManager(null);
|
private HandlerManager eventBus = new HandlerManager(null);
|
||||||
private GCubeCkanDataCatalogPanel panel;
|
private GCubeCkanDataCatalogPanel gcubeCkanDataCatalogue;
|
||||||
private String logoutFromCKANURL;
|
private String logoutFromCKANURL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,13 +69,13 @@ public class CkanEventHandlerManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the panel.
|
* Sets the gcubeCkanDataCatalogue.
|
||||||
*
|
*
|
||||||
* @param panel the panel to set
|
* @param gcubeCkanDataCatalogue the gcubeCkanDataCatalogue to set
|
||||||
*/
|
*/
|
||||||
public void setPanel(GCubeCkanDataCatalogPanel panel) {
|
public void setPanel(GCubeCkanDataCatalogPanel panel) {
|
||||||
|
|
||||||
this.panel = panel;
|
this.gcubeCkanDataCatalogue = panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,9 +88,10 @@ public class CkanEventHandlerManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowHome(ShowHomeEvent showHomeEvent) {
|
public void onShowHome(ShowHomeEvent showHomeEvent) {
|
||||||
String pathToUse = panel.isViewPerVREEnabled() ? panel.getPathInfo() : null;
|
String pathToUse = gcubeCkanDataCatalogue.isViewPerVREEnabled() ? gcubeCkanDataCatalogue.getPathInfo()
|
||||||
|
: null;
|
||||||
String request = getCkanRequest(pathToUse, null);
|
String request = getCkanRequest(pathToUse, null);
|
||||||
panel.instanceCkanFrame(request);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -92,18 +100,17 @@ public class CkanEventHandlerManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInsertMetadata(InsertMetadataEvent loadSelectedItemEvent) {
|
public void onInsertMetadata(InsertMetadataEvent loadSelectedItemEvent) {
|
||||||
GWT.log("onInsertMetadata: "+loadSelectedItemEvent);
|
GWT.log("onInsertMetadata: " + loadSelectedItemEvent);
|
||||||
final Modal modal = new ExtModal(true, true);
|
final Modal modal = new ExtModal(true, true);
|
||||||
|
|
||||||
modal.setTitle(WIDGET_CREATE_TITLE);
|
modal.setTitle(WIDGET_CREATE_TITLE);
|
||||||
modal.addStyleName("insert-metadata-modal-style");
|
modal.addStyleName("insert-metadata-modal-style");
|
||||||
modal.addStyleName("modal-top-custom");
|
modal.addStyleName("modal-top-custom");
|
||||||
((Element)modal.getElement().getChildNodes().getItem(1)).addClassName("modal-body-custom");
|
((Element) modal.getElement().getChildNodes().getItem(1)).addClassName("modal-body-custom");
|
||||||
modal.add(new CreateDatasetForm(eventBus));
|
modal.add(new CreateDatasetForm(eventBus));
|
||||||
modal.setCloseVisible(true);
|
modal.setCloseVisible(true);
|
||||||
|
|
||||||
|
|
||||||
// // hide any popup panel opened
|
// // hide any popup gcubeCkanDataCatalogue opened
|
||||||
// modal.addHideHandler(new HideHandler() {
|
// modal.addHideHandler(new HideHandler() {
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
|
@ -118,7 +125,7 @@ public class CkanEventHandlerManager {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
GWT.log("show");
|
GWT.log("show");
|
||||||
modal.show();
|
modal.show();
|
||||||
}
|
}
|
||||||
|
@ -134,95 +141,88 @@ public class CkanEventHandlerManager {
|
||||||
});
|
});
|
||||||
|
|
||||||
// show datasets event
|
// show datasets event
|
||||||
eventBus.addHandler(
|
eventBus.addHandler(ShowDatasetsEvent.TYPE, new ShowDatasetsEventHandler() {
|
||||||
ShowDatasetsEvent.TYPE, new ShowDatasetsEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowDatasets(
|
public void onShowDatasets(ShowDatasetsEvent showUserDatasetsEvent) {
|
||||||
ShowDatasetsEvent showUserDatasetsEvent) {
|
String request = null;
|
||||||
String request = null;
|
if (showUserDatasetsEvent.isOwnOnly())
|
||||||
if(showUserDatasetsEvent.isOwnOnly())
|
request = getCkanRequest("/dashboard/datasets", null);
|
||||||
request = getCkanRequest("/dashboard/datasets", null);
|
else
|
||||||
else
|
request = getCkanRequest("/dataset", null);
|
||||||
request = getCkanRequest("/dataset", null);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
panel.instanceCkanFrame(request);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
eventBus.addHandler(ShowTypesEvent.TYPE,
|
eventBus.addHandler(ShowTypesEvent.TYPE, new ShowTypesEventHandler() {
|
||||||
new ShowTypesEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowTypes(ShowTypesEvent showTypes) {
|
public void onShowTypes(ShowTypesEvent showTypes) {
|
||||||
String request = getCkanRequest("/type", null);
|
String request = getCkanRequest("/type", null);
|
||||||
panel.instanceCkanFrame(request);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
eventBus.addHandler(
|
eventBus.addHandler(ShowOrganizationsEvent.TYPE, new ShowOrganizationsEventHandler() {
|
||||||
ShowOrganizationsEvent.TYPE,
|
|
||||||
new ShowOrganizationsEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowOrganizations(
|
public void onShowOrganizations(ShowOrganizationsEvent showUserDatasetsEvent) {
|
||||||
ShowOrganizationsEvent showUserDatasetsEvent) {
|
|
||||||
|
|
||||||
if(showUserDatasetsEvent.isOwnOnly())
|
if (showUserDatasetsEvent.isOwnOnly())
|
||||||
panel.showOrganizations();
|
gcubeCkanDataCatalogue.showOrganizations();
|
||||||
else{
|
else {
|
||||||
String request = getCkanRequest("/organization", null);
|
String request = getCkanRequest("/organization", null);
|
||||||
panel.instanceCkanFrame(request);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
eventBus.addHandler(
|
eventBus.addHandler(ShowGroupsEvent.TYPE, new ShowGroupsEventHandler() {
|
||||||
ShowGroupsEvent.TYPE, new ShowGroupsEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowGroups(ShowGroupsEvent showGroupsEvent) {
|
public void onShowGroups(ShowGroupsEvent showGroupsEvent) {
|
||||||
//panel.instanceCkanFrame(request);
|
// gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
if(showGroupsEvent.isOwnOnly())
|
if (showGroupsEvent.isOwnOnly())
|
||||||
panel.showGroups();
|
gcubeCkanDataCatalogue.showGroups();
|
||||||
else{
|
else {
|
||||||
String request = getCkanRequest("/group", null);
|
String request = getCkanRequest("/group", null);
|
||||||
panel.instanceCkanFrame(request);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// show statistics event
|
// show statistics event
|
||||||
eventBus.addHandler(
|
eventBus.addHandler(ShowStatisticsEvent.TYPE, new ShowStatisticsEventHandler() {
|
||||||
ShowStatisticsEvent.TYPE, new ShowStatisticsEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShowStatistics(
|
public void onShowStatistics(ShowStatisticsEvent showStatisticsEvent) {
|
||||||
ShowStatisticsEvent showStatisticsEvent) {
|
String request = getCkanRequest("/stats", null);
|
||||||
String request = getCkanRequest("/stats", null);
|
gcubeCkanDataCatalogue.instanceCkanFrame(request);
|
||||||
panel.instanceCkanFrame(request);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
// eventBus.addHandler(NotifyLogoutEvent.TYPE, new NotifyLogoutEventHandler() {
|
// eventBus.addHandler(NotifyLogoutEvent.TYPE, new NotifyLogoutEventHandler() {
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void onLogout(NotifyLogoutEvent editMetadataEvent) {
|
// public void onLogout(NotifyLogoutEvent editMetadataEvent) {
|
||||||
//
|
//
|
||||||
// // CKanLeaveFrame frame = new CKanLeaveFrame(GCubeCkanDataCatalog.CKAN_LOGUT_SERVICE);
|
// // CKanLeaveFrame frame = new
|
||||||
// // DOM.appendChild(RootPanel.getBodyElement(), frame.getElement());
|
// CKanLeaveFrame(GCubeCkanDataCatalog.CKAN_LOGUT_SERVICE);
|
||||||
// }
|
// // DOM.appendChild(RootPanel.getBodyElement(), frame.getElement());
|
||||||
// });
|
// }
|
||||||
|
// });
|
||||||
//
|
//
|
||||||
// eventBus.addHandler(IFrameInstanciedEvent.TYPE, new IFrameInstanciedEventHandler() {
|
// eventBus.addHandler(IFrameInstanciedEvent.TYPE, new
|
||||||
|
// IFrameInstanciedEventHandler() {
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void onNewInstance(IFrameInstanciedEvent iFrameInstanciedEvent) {
|
// public void onNewInstance(IFrameInstanciedEvent iFrameInstanciedEvent) {
|
||||||
//
|
//
|
||||||
// panel.updateSize();
|
// gcubeCkanDataCatalogue.updateSize();
|
||||||
// if(logoutFromCKANURL==null)
|
// if(logoutFromCKANURL==null)
|
||||||
// instanceLogoutSystem();
|
// instanceLogoutSystem();
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
eventBus.addHandler(ShowManageProductWidgetEvent.TYPE, new ShowManageProductWidgetEventHandler() {
|
eventBus.addHandler(ShowManageProductWidgetEvent.TYPE, new ShowManageProductWidgetEventHandler() {
|
||||||
|
|
||||||
|
@ -231,14 +231,40 @@ public class CkanEventHandlerManager {
|
||||||
new ManageProductWidget(event.getProductIdentifier(), eventBus);
|
new ManageProductWidget(event.getProductIdentifier(), eventBus);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eventBus.addHandler(ClickedCMSManageProductButtonEvent.TYPE, new ClickedCMSManageProductButtonEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClickedManageProduct(ClickedCMSManageProductButtonEvent showManageProductWidgetEvent) {
|
||||||
|
|
||||||
|
CkanContentModeratorCheckConfigs config = gcubeCkanDataCatalogue.getCkanModeratorConfig();
|
||||||
|
|
||||||
|
DISPLAY_FIELD[] sortByFields = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (config.isModeratorRoleAssigned()) {
|
||||||
|
sortByFields = DISPLAY_FIELD.values();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sortByFields == null) {
|
||||||
|
sortByFields = ContentModeratorWidgetConstants.DEFAULT_SORT_BY_FIELDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
final CkanContentModeratorWidgetTrusted cmsTrusted = new CkanContentModeratorWidgetTrusted(
|
||||||
|
ItemStatus.PENDING, DISPLAY_FIELD.values(), sortByFields, config);
|
||||||
|
|
||||||
|
cmsTrusted.showAsModal(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
eventBus.addHandler(ShowRevertOperationWidgetEvent.TYPE, new ShowRevertOperationWidgetEventHandler() {
|
eventBus.addHandler(ShowRevertOperationWidgetEvent.TYPE, new ShowRevertOperationWidgetEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onShowRevertOperationWidgetEvent(
|
public void onShowRevertOperationWidgetEvent(ShowRevertOperationWidgetEvent event) {
|
||||||
ShowRevertOperationWidgetEvent event) {
|
|
||||||
|
|
||||||
new ManageProductWidget(event.getEncryptedUrl(), eventBus);
|
new ManageProductWidget(event.getEncryptedUrl(), eventBus);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -252,31 +278,32 @@ public class CkanEventHandlerManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// hide management panel if user is not allowed to manage
|
// hide management gcubeCkanDataCatalogue if user is not allowed to manage
|
||||||
eventBus.addHandler(HideManagementPanelEvent.TYPE, new HideManagementPanelEventHandler() {
|
eventBus.addHandler(HideManagementPanelEvent.TYPE, new HideManagementPanelEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(HideManagementPanelEvent hideEvent) {
|
public void onEvent(HideManagementPanelEvent hideEvent) {
|
||||||
|
|
||||||
panel.showManagementPanel(false);
|
gcubeCkanDataCatalogue.showManagementPanel(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
eventBus.addHandler(PublishOnZenodoEvent.TYPE, new PublishOnZenodoEventHandler() {
|
eventBus.addHandler(PublishOnZenodoEvent.TYPE, new PublishOnZenodoEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPublishOnZenodo(PublishOnZenodoEvent publishOnZenodoEvent) {
|
public void onPublishOnZenodo(PublishOnZenodoEvent publishOnZenodoEvent) {
|
||||||
|
|
||||||
if(publishOnZenodoEvent.getItemId()!=null) {
|
if (publishOnZenodoEvent.getItemId() != null) {
|
||||||
|
|
||||||
CkanToZendoPublisherWidget publisherWidget = new CkanToZendoPublisherWidget();
|
CkanToZendoPublisherWidget publisherWidget = new CkanToZendoPublisherWidget();
|
||||||
CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getItemId(), null, null, CatalogueItem.ITEM_TYPE.DATASET);
|
CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getItemId(), null, null,
|
||||||
|
CatalogueItem.ITEM_TYPE.DATASET);
|
||||||
publisherWidget.publishOnZenodo(ci);
|
publisherWidget.publishOnZenodo(ci);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,13 +311,14 @@ public class CkanEventHandlerManager {
|
||||||
* Gets the ckan request.
|
* Gets the ckan request.
|
||||||
*
|
*
|
||||||
* @param pathInfo the path info
|
* @param pathInfo the path info
|
||||||
* @param query the query
|
* @param query the query
|
||||||
* @return the ckan request
|
* @return the ckan request
|
||||||
*/
|
*/
|
||||||
private String getCkanRequest(String pathInfo, String query){
|
private String getCkanRequest(String pathInfo, String query) {
|
||||||
CkanConnectorAccessPoint ckan = new CkanConnectorAccessPoint(panel.getBaseURLCKANConnector(),"");
|
CkanConnectorAccessPoint ckan = new CkanConnectorAccessPoint(gcubeCkanDataCatalogue.getBaseURLCKANConnector(),
|
||||||
if(panel.getGcubeTokenValueToCKANConnector() != null)
|
"");
|
||||||
ckan.addGubeToken(panel.getGcubeTokenValueToCKANConnector());
|
if (gcubeCkanDataCatalogue.getGcubeTokenValueToCKANConnector() != null)
|
||||||
|
ckan.addGubeToken(gcubeCkanDataCatalogue.getGcubeTokenValueToCKANConnector());
|
||||||
pathInfo = CkanConnectorAccessPoint.checkNullString(pathInfo);
|
pathInfo = CkanConnectorAccessPoint.checkNullString(pathInfo);
|
||||||
query = CkanConnectorAccessPoint.checkNullString(query);
|
query = CkanConnectorAccessPoint.checkNullString(query);
|
||||||
ckan.addPathInfo(pathInfo);
|
ckan.addPathInfo(pathInfo);
|
||||||
|
@ -308,7 +336,7 @@ public class CkanEventHandlerManager {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String result) {
|
public void onSuccess(String result) {
|
||||||
logoutFromCKANURL = result;
|
logoutFromCKANURL = result;
|
||||||
GWT.log("Loaded logout url: "+logoutFromCKANURL);
|
GWT.log("Loaded logout url: " + logoutFromCKANURL);
|
||||||
performLogoutOnBrowserClosedEvent(logoutFromCKANURL);
|
performLogoutOnBrowserClosedEvent(logoutFromCKANURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +381,8 @@ public class CkanEventHandlerManager {
|
||||||
function sleep(milliseconds) {
|
function sleep(milliseconds) {
|
||||||
var start = new Date().getTime();
|
var start = new Date().getTime();
|
||||||
for (var i = 0; i < 1e7; i++) {
|
for (var i = 0; i < 1e7; i++) {
|
||||||
if ((new Date().getTime() - start) > milliseconds || logoutPerformed) {
|
if ((new Date().getTime() - start) > milliseconds
|
||||||
|
|| logoutPerformed) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -417,7 +446,6 @@ public class CkanEventHandlerManager {
|
||||||
|
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the event bus.
|
* Gets the event bus.
|
||||||
*
|
*
|
||||||
|
@ -428,7 +456,6 @@ public class CkanEventHandlerManager {
|
||||||
return eventBus;
|
return eventBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the logout from ckanurl.
|
* Gets the logout from ckanurl.
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,25 +7,23 @@ import com.google.gwt.core.client.EntryPoint;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.user.client.ui.RootPanel;
|
import com.google.gwt.user.client.ui.RootPanel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class GCubeCkanDataCatalog.
|
* The Class GCubeCkanDataCatalog.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Nov 4, 2016
|
||||||
* Nov 4, 2016
|
|
||||||
*/
|
*/
|
||||||
public class GCubeCkanDataCatalog implements EntryPoint {
|
public class GCubeCkanDataCatalog implements EntryPoint {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a remote service proxy to talk to the server-side Greeting
|
* Create a remote service proxy to talk to the server-side Greeting service.
|
||||||
* service.
|
|
||||||
*/
|
*/
|
||||||
public static final GcubeCkanDataCatalogServiceAsync service = GWT.create(GcubeCkanDataCatalogService.class);
|
public static final GcubeCkanDataCatalogServiceAsync service = GWT.create(GcubeCkanDataCatalogService.class);
|
||||||
public static final String CKAN_LOGUT_SERVICE = GWT.getModuleBaseURL() +"gcubeckanlogout";
|
public static final String CKAN_LOGUT_SERVICE = GWT.getModuleBaseURL() + "gcubeckanlogout";
|
||||||
private final String DIV_PORTLET_ID = "gCubeCkanDataCatalog";
|
private final String DIV_PORTLET_ID = "gCubeCkanDataCatalog";
|
||||||
private CkanEventHandlerManager eventManager = new CkanEventHandlerManager();
|
private CkanEventHandlerManager eventManager = new CkanEventHandlerManager();
|
||||||
public static final String GET_PATH_PARAMETER = "path";
|
public static final String GET_PATH_PARAMETER = "path";
|
||||||
public static final String GET_QUERY_PARAMETER = "query";
|
public static final String GET_QUERY_PARAMETER = "query";
|
||||||
|
public static final String GET_QUERY_STRING_PARAMETER = "query_string";
|
||||||
public static final String REVERT_QUERY_PARAM = "manage";
|
public static final String REVERT_QUERY_PARAM = "manage";
|
||||||
public static final String GCUBE_CKAN_IFRAME = "gcube-ckan-iframe";
|
public static final String GCUBE_CKAN_IFRAME = "gcube-ckan-iframe";
|
||||||
|
|
||||||
|
@ -34,7 +32,8 @@ public class GCubeCkanDataCatalog implements EntryPoint {
|
||||||
*/
|
*/
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
|
|
||||||
GCubeCkanDataCatalogPanel panel = new GCubeCkanDataCatalogPanel(RootPanel.get(DIV_PORTLET_ID), eventManager.getEventBus());
|
GCubeCkanDataCatalogPanel panel = new GCubeCkanDataCatalogPanel(RootPanel.get(DIV_PORTLET_ID),
|
||||||
|
eventManager.getEventBus());
|
||||||
eventManager.setPanel(panel);
|
eventManager.setPanel(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,32 +5,30 @@ import java.util.List;
|
||||||
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
|
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductResponse;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.RemoteService;
|
import com.google.gwt.user.client.rpc.RemoteService;
|
||||||
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Interface GcubeCkanDataCatalogService.
|
* The Interface GcubeCkanDataCatalogService.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Nov 4, 2016
|
||||||
* Nov 4, 2016
|
|
||||||
*/
|
*/
|
||||||
@RemoteServiceRelativePath("ckandatacatalogue")
|
@RemoteServiceRelativePath("ckandatacatalogue")
|
||||||
public interface GcubeCkanDataCatalogService extends RemoteService {
|
public interface GcubeCkanDataCatalogService extends RemoteService {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ckan connector access point.
|
* Get the ckan connector access point.
|
||||||
*
|
*
|
||||||
* @param browserLocationURL the browser location URL
|
* @param browserLocationURL the browser location URL
|
||||||
* @param pathInfoParameters the path info parameters
|
* @param pathInfoParameters the path info parameters
|
||||||
* @param queryStringParameters the query string parameters
|
* @param queryStringParameters the query string parameters
|
||||||
* @return the c kan connector
|
* @return the c kan connector
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
CkanConnectorAccessPoint getCKanConnector(
|
CkanConnectorAccessPoint getCKanConnector(String browserLocationURL, String pathInfoParameters,
|
||||||
String browserLocationURL, String pathInfoParameters, String queryStringParameters) throws Exception;
|
String queryStringParameters) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current role in CKAN for this user.
|
* Get the current role in CKAN for this user.
|
||||||
|
@ -61,32 +59,41 @@ public interface GcubeCkanDataCatalogService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
String logoutFromCkanURL();
|
String logoutFromCkanURL();
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * Remove auth cookie for ckan of this user.
|
// * Remove auth cookie for ckan of this user.
|
||||||
// *
|
// *
|
||||||
// * @return the string
|
// * @return the string
|
||||||
// */
|
// */
|
||||||
// String logoutURIFromCkan();
|
// String logoutURIFromCkan();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the manage product needs to be shown (e.g., for GRSF products)
|
* Check if the manage product needs to be shown (e.g., for GRSF products)
|
||||||
* @return
|
*
|
||||||
|
* @return the manage product response
|
||||||
*/
|
*/
|
||||||
boolean isManageProductEnabled();
|
ManageProductResponse isManageProductEnabled();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the view per VRE is enabled, so the management panels but publish/share link must be removed.
|
* Check if the view per VRE is enabled, so the management panels but
|
||||||
|
* publish/share link must be removed.
|
||||||
|
*
|
||||||
* @param browserLocationURL the browser location URL
|
* @param browserLocationURL the browser location URL
|
||||||
* @return the string
|
* @return the string
|
||||||
*/
|
*/
|
||||||
String isViewPerVREEnabled(String browserLocationURL);
|
String isViewPerVREEnabled(String browserLocationURL);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outside login portal.
|
* Outside login portal.
|
||||||
*
|
*
|
||||||
* @return true, if successful
|
* @return true, if successful
|
||||||
*/
|
*/
|
||||||
boolean outsideLoginPortal();
|
boolean outsideLoginPortal();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check moderation enabled.
|
||||||
|
*
|
||||||
|
* @param reloadConfig the reload config
|
||||||
|
* @return the manage product response
|
||||||
|
*/
|
||||||
|
ManageProductResponse checkModerationEnabled(boolean reloadConfig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,16 +8,14 @@ import java.util.List;
|
||||||
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
|
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductResponse;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Interface GcubeCkanDataCatalogServiceAsync.
|
* The Interface GcubeCkanDataCatalogServiceAsync.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Nov 4, 2016
|
||||||
* Nov 4, 2016
|
|
||||||
*/
|
*/
|
||||||
public interface GcubeCkanDataCatalogServiceAsync {
|
public interface GcubeCkanDataCatalogServiceAsync {
|
||||||
|
|
||||||
|
@ -32,14 +30,13 @@ public interface GcubeCkanDataCatalogServiceAsync {
|
||||||
/**
|
/**
|
||||||
* Gets the CKAN connector.
|
* Gets the CKAN connector.
|
||||||
*
|
*
|
||||||
* @param browserLocationURL the browser location URL that performs the call
|
* @param browserLocationURL the browser location URL that performs the call
|
||||||
* @param pathInfoParameters the path info parameters
|
* @param pathInfoParameters the path info parameters
|
||||||
* @param queryStringParameters the query string parameters
|
* @param queryStringParameters the query string parameters
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
* @return the c kan connector
|
* @return the c kan connector
|
||||||
*/
|
*/
|
||||||
void getCKanConnector(
|
void getCKanConnector(String browserLocationURL, String pathInfoParameters, String queryStringParameters,
|
||||||
String browserLocationURL, String pathInfoParameters, String queryStringParameters,
|
|
||||||
AsyncCallback<CkanConnectorAccessPoint> callback);
|
AsyncCallback<CkanConnectorAccessPoint> callback);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,8 +52,7 @@ public interface GcubeCkanDataCatalogServiceAsync {
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
* @return the ckan organizations names and urls for user
|
* @return the ckan organizations names and urls for user
|
||||||
*/
|
*/
|
||||||
void getCkanOrganizationsNamesAndUrlsForUser(
|
void getCkanOrganizationsNamesAndUrlsForUser(AsyncCallback<List<BeanUserInOrgGroupRole>> callback);
|
||||||
AsyncCallback<List<BeanUserInOrgGroupRole>> callback);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the list of groups to whom the user belongs and their urls.
|
* Retrieve the list of groups to whom the user belongs and their urls.
|
||||||
|
@ -64,30 +60,35 @@ public interface GcubeCkanDataCatalogServiceAsync {
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
* @return the ckan groups names and urls for user
|
* @return the ckan groups names and urls for user
|
||||||
*/
|
*/
|
||||||
void getCkanGroupsNamesAndUrlsForUser(
|
void getCkanGroupsNamesAndUrlsForUser(AsyncCallback<List<BeanUserInOrgGroupRole>> callback);
|
||||||
AsyncCallback<List<BeanUserInOrgGroupRole>> callback);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the manage product needs to be shown (e.g., for GRSF products)
|
* Checks if is manage product enabled.
|
||||||
*
|
*
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
*/
|
*/
|
||||||
void isManageProductEnabled(AsyncCallback<Boolean> callback);
|
void isManageProductEnabled(AsyncCallback<ManageProductResponse> callback);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is view per VRE enabled.
|
* Checks if is view per VRE enabled.
|
||||||
*
|
*
|
||||||
* @param browserLocationURL the browser location URL
|
* @param browserLocationURL the browser location URL
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
*/
|
*/
|
||||||
void isViewPerVREEnabled(String browserLocationURL, AsyncCallback<String> callback);
|
void isViewPerVREEnabled(String browserLocationURL, AsyncCallback<String> callback);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outside login portal.
|
* Outside login portal.
|
||||||
*
|
*
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
*/
|
*/
|
||||||
void outsideLoginPortal(AsyncCallback<Boolean> callback);
|
void outsideLoginPortal(AsyncCallback<Boolean> callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check moderation enabled.
|
||||||
|
*
|
||||||
|
* @param reloadConfig the reload config
|
||||||
|
* @param callback the callback
|
||||||
|
*/
|
||||||
|
void checkModerationEnabled(boolean reloadConfig, AsyncCallback<ManageProductResponse> callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ClickedCMSManageProductButtonEvent.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Jun 15, 2021
|
||||||
|
*/
|
||||||
|
public class ClickedCMSManageProductButtonEvent extends GwtEvent<ClickedCMSManageProductButtonEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ClickedCMSManageProductButtonEventHandler> TYPE = new Type<ClickedCMSManageProductButtonEventHandler>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new clicked Content Moderation System (CMS) manage product button event.
|
||||||
|
*/
|
||||||
|
public ClickedCMSManageProductButtonEvent() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the associated type.
|
||||||
|
*
|
||||||
|
* @return the associated type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public com.google.gwt.event.shared.GwtEvent.Type<ClickedCMSManageProductButtonEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatch.
|
||||||
|
*
|
||||||
|
* @param handler the handler
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ClickedCMSManageProductButtonEventHandler handler) {
|
||||||
|
handler.onClickedManageProduct(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Interface ClickedCMSManageProductButtonEventHandler.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Jun 15, 2021
|
||||||
|
*/
|
||||||
|
public interface ClickedCMSManageProductButtonEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On clicked manage product.
|
||||||
|
*
|
||||||
|
* @param showManageProductWidgetEvent the show manage product widget event
|
||||||
|
*/
|
||||||
|
void onClickedManageProduct(ClickedCMSManageProductButtonEvent showManageProductWidgetEvent);
|
||||||
|
|
||||||
|
}
|
|
@ -19,17 +19,17 @@ import com.google.gwt.user.client.ui.Frame;
|
||||||
import com.google.gwt.user.client.ui.Image;
|
import com.google.gwt.user.client.ui.Image;
|
||||||
import com.google.gwt.user.client.ui.NamedFrame;
|
import com.google.gwt.user.client.ui.NamedFrame;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class CkanFramePanel.
|
* The Class CkanFramePanel.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
* Jun 9, 2016
|
*
|
||||||
|
* Feb 25, 2022
|
||||||
*/
|
*/
|
||||||
public class CkanFramePanel extends FlowPanel{
|
public class CkanFramePanel extends FlowPanel {
|
||||||
|
|
||||||
private NamedFrame frame;
|
private NamedFrame frame;
|
||||||
//private static final String FRAME_NAME = "ckan-content-frame";
|
// private static final String FRAME_NAME = "ckan-content-frame";
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
private Image loading = new Image(CkanPortletResources.ICONS.loading());
|
private Image loading = new Image(CkanPortletResources.ICONS.loading());
|
||||||
private String messageToSend;
|
private String messageToSend;
|
||||||
|
@ -47,19 +47,17 @@ public class CkanFramePanel extends FlowPanel{
|
||||||
/**
|
/**
|
||||||
* Post message.
|
* Post message.
|
||||||
*
|
*
|
||||||
* @param msg the msg (as json)
|
* @param msg the msg (as json)
|
||||||
* @param javaScriptObject
|
* @param frameName the frame name
|
||||||
* @param
|
|
||||||
* @param
|
|
||||||
*/
|
*/
|
||||||
protected native void sendMessage(String msg, String frameName) /*-{
|
protected native void sendMessage(String msg, String frameName) /*-{
|
||||||
console.log("Sending message " + msg);
|
console.log("Sending message " + msg);
|
||||||
// $wnd.parent.postMessage(msg,'*');
|
// $wnd.parent.postMessage(msg,'*');
|
||||||
//var f = $wnd.frames[frameName];
|
//var f = $wnd.frames[frameName];
|
||||||
//console.log(f);
|
//console.log(f);
|
||||||
//f.contentWindow.postMessage(msg, "*");
|
//f.contentWindow.postMessage(msg, "*");
|
||||||
$wnd.frames[frameName].postMessage(msg,"*")
|
$wnd.frames[frameName].postMessage(msg, "*")
|
||||||
console.log("Message sent");
|
console.log("Message sent");
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,36 +66,38 @@ public class CkanFramePanel extends FlowPanel{
|
||||||
* @param msg the msg
|
* @param msg the msg
|
||||||
*/
|
*/
|
||||||
private static native void print(String msg)/*-{
|
private static native void print(String msg)/*-{
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instance frame.
|
* Instance frame.
|
||||||
*
|
*
|
||||||
* @param ckanUrlConnector the ckan url connector
|
* @param ckanUrlConnector the ckan url connector
|
||||||
|
* @param messageToSend the message to send
|
||||||
|
* @param ckanUrl the ckan url
|
||||||
* @return the frame
|
* @return the frame
|
||||||
*/
|
*/
|
||||||
public Frame instanceFrame(String ckanUrlConnector, final String messageToSend,final String ckanUrl) {
|
public Frame instanceFrame(String ckanUrlConnector, final String messageToSend, final String ckanUrl) {
|
||||||
GWT.log("Instancing new IFRAME with uri: "+ckanUrlConnector);
|
GWT.log("Instancing new IFRAME with uri: " + ckanUrlConnector);
|
||||||
try{
|
try {
|
||||||
if(frame != null)
|
if (frame != null)
|
||||||
remove(frame);
|
remove(frame);
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
print("Error " + e);
|
print("Error " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
addLoading();
|
addLoading();
|
||||||
String urlEncoded = URL.encode(ckanUrlConnector);
|
String urlEncoded = URL.encode(ckanUrlConnector);
|
||||||
GWT.log("Encoded url for instanciating frame is " + urlEncoded);
|
GWT.log("Encoded url for instanciating frame is " + urlEncoded);
|
||||||
|
|
||||||
frame = new NamedFrame(GCubeCkanDataCatalog.GCUBE_CKAN_IFRAME);
|
frame = new NamedFrame(GCubeCkanDataCatalog.GCUBE_CKAN_IFRAME);
|
||||||
frame.setUrl(urlEncoded);
|
frame.setUrl(urlEncoded);
|
||||||
|
|
||||||
frame.getElement().setId(GCubeCkanDataCatalog.GCUBE_CKAN_IFRAME);
|
frame.getElement().setId(GCubeCkanDataCatalog.GCUBE_CKAN_IFRAME);
|
||||||
frame.setWidth("100%");
|
frame.setWidth("100%");
|
||||||
// frame.setHeight("100%");
|
// frame.setHeight("100%");
|
||||||
// frame.getElement().getStyle().setOverflow(Overflow.HIDDEN);
|
// frame.getElement().getStyle().setOverflow(Overflow.HIDDEN);
|
||||||
// frame.getElement().setAttribute("scrolling", "no");
|
// frame.getElement().setAttribute("scrolling", "no");
|
||||||
frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
|
frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
|
||||||
frame.addLoadHandler(new LoadHandler() {
|
frame.addLoadHandler(new LoadHandler() {
|
||||||
|
|
||||||
|
@ -125,9 +125,9 @@ public class CkanFramePanel extends FlowPanel{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add loading image
|
* add loading image.
|
||||||
*/
|
*/
|
||||||
private void addLoading(){
|
private void addLoading() {
|
||||||
this.add(loading);
|
this.add(loading);
|
||||||
loading.getElement().getStyle().setProperty("margin", "auto");
|
loading.getElement().getStyle().setProperty("margin", "auto");
|
||||||
loading.getElement().getStyle().setDisplay(Display.BLOCK);
|
loading.getElement().getStyle().setDisplay(Display.BLOCK);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view;
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view;
|
||||||
|
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ClickedCMSManageProductButtonEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.PublishOnZenodoEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.PublishOnZenodoEvent;
|
||||||
|
@ -34,6 +35,7 @@ import com.google.gwt.user.client.ui.InlineHTML;
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* @author Costantino Perciante costantino.perciante@isti.cnr.it Jun 9, 2016
|
* @author Costantino Perciante costantino.perciante@isti.cnr.it Jun 9, 2016
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class CkanMetadataManagementPanel extends FlowPanel {
|
public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
|
|
||||||
|
@ -42,9 +44,12 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
*/
|
*/
|
||||||
private static final String MY_PREFIX = "My ";
|
private static final String MY_PREFIX = "My ";
|
||||||
|
|
||||||
private static final String MANAGE_ITEM_TOOLTIP = "By pushing on this button, you will be able to manage the item you are viewing."
|
private static final String MANAGE_GRSF_ITEM_TOOLTIP = "By pushing on this button, you will be able to manage the item you are viewing."
|
||||||
+ " Manageable items are the GRSF ones.";
|
+ " Manageable items are the GRSF ones.";
|
||||||
|
|
||||||
|
private static final String MANAGE_CMS_ITEMS_TOOLTIP = "By pushing on this button, you will be able to manage (APPROVING or REJECTING) the item under approval"
|
||||||
|
+ "Manageable items are not APPROVED and NOT PUBLISHED in the Catalogue.";
|
||||||
|
|
||||||
private AlertBlock nav = new AlertBlock();
|
private AlertBlock nav = new AlertBlock();
|
||||||
|
|
||||||
// generic
|
// generic
|
||||||
|
@ -69,7 +74,8 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
private Button uploadToZenodo = new Button("Upload to Zenodo");
|
private Button uploadToZenodo = new Button("Upload to Zenodo");
|
||||||
private Button insertMeta = new Button("Publish Item");
|
private Button insertMeta = new Button("Publish Item");
|
||||||
private Button editMeta = new Button("Edit Item");
|
private Button editMeta = new Button("Edit Item");
|
||||||
private Button manageProduct = new Button("Manage Item");
|
private Button manageGRSFProduct = new Button("Manage GRSF Item"); //GRSF Manage
|
||||||
|
private Button manageCModS = new Button("Manage Items"); //Moderation
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,8 +105,12 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
uploadToZenodo.setType(ButtonType.LINK);
|
uploadToZenodo.setType(ButtonType.LINK);
|
||||||
insertMeta.setType(ButtonType.LINK);
|
insertMeta.setType(ButtonType.LINK);
|
||||||
editMeta.setType(ButtonType.LINK);
|
editMeta.setType(ButtonType.LINK);
|
||||||
manageProduct.setType(ButtonType.PRIMARY);
|
manageGRSFProduct.setType(ButtonType.PRIMARY);
|
||||||
manageProduct.getElement().getStyle().setFloat(Float.RIGHT);
|
manageGRSFProduct.getElement().getStyle().setFloat(Float.RIGHT);
|
||||||
|
|
||||||
|
manageCModS.setType(ButtonType.PRIMARY);
|
||||||
|
manageCModS.getElement().getStyle().setFloat(Float.RIGHT);
|
||||||
|
manageCModS.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
|
|
||||||
// set icons
|
// set icons
|
||||||
home.setIcon(IconType.HOME);
|
home.setIcon(IconType.HOME);
|
||||||
|
@ -116,19 +126,26 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
insertMeta.setIcon(IconType.FILE);
|
insertMeta.setIcon(IconType.FILE);
|
||||||
editMeta.setIcon(IconType.EDIT_SIGN);
|
editMeta.setIcon(IconType.EDIT_SIGN);
|
||||||
statistics.setIcon(IconType.BAR_CHART);
|
statistics.setIcon(IconType.BAR_CHART);
|
||||||
manageProduct.setIcon(IconType.CHECK_SIGN);
|
manageGRSFProduct.setIcon(IconType.CHECK_SIGN);
|
||||||
|
manageCModS.setIcon(IconType.CHECK_SIGN);
|
||||||
|
|
||||||
// hide edit and insert
|
// hide edit and insert
|
||||||
shareLink.setEnabled(false);
|
shareLink.setEnabled(false);
|
||||||
uploadToZenodo.setEnabled(false);
|
uploadToZenodo.setEnabled(false);
|
||||||
editMeta.setVisible(false);
|
editMeta.setVisible(false);
|
||||||
insertMeta.setVisible(false);
|
insertMeta.setVisible(false);
|
||||||
manageProduct.setVisible(false);
|
manageGRSFProduct.setVisible(false);
|
||||||
manageProduct.setEnabled(false);
|
manageGRSFProduct.setEnabled(false);
|
||||||
|
manageCModS.setVisible(false);
|
||||||
|
manageCModS.setEnabled(false);
|
||||||
|
|
||||||
// manage item info
|
// manage GRSF item info
|
||||||
manageProduct.setTitle(MANAGE_ITEM_TOOLTIP);
|
manageGRSFProduct.setTitle(MANAGE_GRSF_ITEM_TOOLTIP);
|
||||||
manageProduct.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
manageGRSFProduct.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
|
|
||||||
|
// manage CMS item info
|
||||||
|
manageCModS.setTitle(MANAGE_CMS_ITEMS_TOOLTIP);
|
||||||
|
manageCModS.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
|
|
||||||
// add to navigation bar
|
// add to navigation bar
|
||||||
nav.add(home);
|
nav.add(home);
|
||||||
|
@ -150,7 +167,8 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
nav.add(uploadToZenodo);
|
nav.add(uploadToZenodo);
|
||||||
nav.add(insertMeta);
|
nav.add(insertMeta);
|
||||||
nav.add(editMeta);
|
nav.add(editMeta);
|
||||||
nav.add(manageProduct);
|
nav.add(manageGRSFProduct);
|
||||||
|
nav.add(manageCModS);
|
||||||
nav.setClose(false);
|
nav.setClose(false);
|
||||||
nav.setType(AlertType.INFO);
|
nav.setType(AlertType.INFO);
|
||||||
nav.getElement().getStyle().setMarginBottom(0, Unit.PX);
|
nav.getElement().getStyle().setMarginBottom(0, Unit.PX);
|
||||||
|
@ -272,7 +290,7 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
manageProduct.addClickHandler(new ClickHandler() {
|
manageGRSFProduct.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
|
@ -283,6 +301,16 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
manageCModS.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
|
eventBus.fireEvent(new ClickedCMSManageProductButtonEvent());
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
shareLink.addClickHandler(new ClickHandler() {
|
shareLink.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -328,12 +356,12 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button to manage the product.. for example in grsf case
|
* Button to manage the GRSF product.. for example in grsf case
|
||||||
*
|
*
|
||||||
* @param value true or false
|
* @param value true or false
|
||||||
*/
|
*/
|
||||||
public void showManageProductButton(boolean value) {
|
public void showManageGRSFProductButton(boolean value) {
|
||||||
manageProduct.setVisible(value);
|
manageGRSFProduct.setVisible(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -341,8 +369,26 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
*
|
*
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
public void enableManageProductButton(boolean value) {
|
public void enableManageGRSFProductButton(boolean value) {
|
||||||
manageProduct.setEnabled(value);
|
manageGRSFProduct.setEnabled(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button to manage the products under moderation via Content Moderation System (CMS)
|
||||||
|
*
|
||||||
|
* @param value true or false
|
||||||
|
*/
|
||||||
|
public void showManageCMSProductsButton(boolean value) {
|
||||||
|
manageCModS.setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable manage CMS products button.
|
||||||
|
*
|
||||||
|
* @param value the value
|
||||||
|
*/
|
||||||
|
public void enableManageCMSProductsButton(boolean value) {
|
||||||
|
manageCModS.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -362,7 +408,7 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
public void enablePublishOnZenodoButton(boolean value) {
|
public void enablePublishOnZenodoButton(boolean value) {
|
||||||
uploadToZenodo.setEnabled(value);
|
uploadToZenodo.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visibility publish on zenodo button.
|
* Visibility publish on zenodo button.
|
||||||
*
|
*
|
||||||
|
@ -386,7 +432,8 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
myDatasets.setVisible(false);
|
myDatasets.setVisible(false);
|
||||||
myOrganizations.setVisible(false);
|
myOrganizations.setVisible(false);
|
||||||
myGroups.setVisible(false);
|
myGroups.setVisible(false);
|
||||||
manageProduct.setVisible(false);
|
manageGRSFProduct.setVisible(false);
|
||||||
|
manageCModS.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +453,8 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
||||||
myOrganizations.setVisible(false);
|
myOrganizations.setVisible(false);
|
||||||
myGroups.setVisible(false);
|
myGroups.setVisible(false);
|
||||||
statistics.setVisible(false);
|
statistics.setVisible(false);
|
||||||
manageProduct.setVisible(false);
|
manageGRSFProduct.setVisible(false);
|
||||||
|
manageCModS.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,13 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowRevert
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.resource.CkanPortletResources;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.resource.CkanPortletResources;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductResponse;
|
||||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZenodoPublisherServiceAsync;
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZenodoPublisherServiceAsync;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorCheckConfigs;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorWidget;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.util.ModerationQueryStringUtil;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.util.ModerationQueryStringUtil.ModerationBuilder;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.util.QueryStringUtil;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||||
|
@ -25,6 +31,7 @@ import com.google.gwt.json.client.JSONObject;
|
||||||
import com.google.gwt.json.client.JSONParser;
|
import com.google.gwt.json.client.JSONParser;
|
||||||
import com.google.gwt.json.client.JSONString;
|
import com.google.gwt.json.client.JSONString;
|
||||||
import com.google.gwt.json.client.JSONValue;
|
import com.google.gwt.json.client.JSONValue;
|
||||||
|
import com.google.gwt.user.client.Command;
|
||||||
import com.google.gwt.user.client.Cookies;
|
import com.google.gwt.user.client.Cookies;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
@ -50,27 +57,27 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
private RootPanel rootPanel;
|
private RootPanel rootPanel;
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
private CkanConnectorAccessPoint ckanAccessPoint;
|
private CkanConnectorAccessPoint ckanAccessPoint;
|
||||||
private boolean isManageProductToShow = false;
|
private ManageProductResponse manageProductResponse = null;
|
||||||
|
private ManageProductResponse moderationProductResponse = null;
|
||||||
private String viewPerVREPath = null;
|
private String viewPerVREPath = null;
|
||||||
private static String latestSelectedProductIdentifier;
|
private static String latestSelectedProductIdentifier;
|
||||||
public static final int IFRAME_FIX_HEIGHT = 1800;
|
public static final int IFRAME_FIX_HEIGHT = 1800;
|
||||||
private JSONObject obj;
|
private JSONObject obj;
|
||||||
|
private boolean reloadCatServiceConfig = false;
|
||||||
|
private CkanContentModeratorCheckConfigs ckanModeratorCheckConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new g cube ckan data catalog panel.
|
* Instantiates a new g cube ckan data catalog panel.
|
||||||
*
|
*
|
||||||
* @param rootPanel
|
* @param rootPanel the root panel
|
||||||
* the root panel
|
* @param eventManager the event manager
|
||||||
* @param eventManager
|
|
||||||
* the event manager
|
|
||||||
*/
|
*/
|
||||||
public GCubeCkanDataCatalogPanel(
|
public GCubeCkanDataCatalogPanel(RootPanel rootPanel, HandlerManager eventManager) {
|
||||||
RootPanel rootPanel, HandlerManager eventManager) {
|
|
||||||
|
|
||||||
this.rootPanel = rootPanel;
|
this.rootPanel = rootPanel;
|
||||||
this.eventBus = eventManager;
|
this.eventBus = eventManager;
|
||||||
|
|
||||||
//postMessage(obj.toString(), ckanFramePanel.getFrame());
|
// postMessage(obj.toString(), ckanFramePanel.getFrame());
|
||||||
// send message about gateway url
|
// send message about gateway url
|
||||||
obj = new JSONObject();
|
obj = new JSONObject();
|
||||||
String landingPageVREs = Window.Location.getProtocol() + "//" + Window.Location.getHostName() + "/explore";
|
String landingPageVREs = Window.Location.getProtocol() + "//" + Window.Location.getHostName() + "/explore";
|
||||||
|
@ -85,9 +92,9 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
setTopPanelVisible(true);
|
setTopPanelVisible(true);
|
||||||
|
|
||||||
// decode parameters (they could have been encoded)
|
// decode parameters (they could have been encoded)
|
||||||
final Map<String, String> paramsMap = new HashMap<String, String>(2);
|
final Map<String, String> paramsMap = new HashMap<String, String>(3);
|
||||||
String queryParameters = Window.Location.getQueryString();
|
String queryParameters = Window.Location.getQueryString();
|
||||||
if(queryParameters != null && !queryParameters.isEmpty()){
|
if (queryParameters != null && !queryParameters.isEmpty()) {
|
||||||
String decoded = URL.decodeQueryString(queryParameters); // equals should be encoded too (%3D)
|
String decoded = URL.decodeQueryString(queryParameters); // equals should be encoded too (%3D)
|
||||||
String[] params = decoded.substring(decoded.indexOf("?") + 1).split("&");
|
String[] params = decoded.substring(decoded.indexOf("?") + 1).split("&");
|
||||||
for (int i = 0; i < params.length; i++) {
|
for (int i = 0; i < params.length; i++) {
|
||||||
|
@ -97,19 +104,32 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
GWT.log("Extracted parameters are " + paramsMap);
|
GWT.log("Extracted parameters are " + paramsMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
String pathParameter = paramsMap.get(GCubeCkanDataCatalog.GET_PATH_PARAMETER); //Window.Location.getParameter(GCubeCkanDataCatalog.GET_PATH_PARAMETER);
|
String pathParameter = paramsMap.get(GCubeCkanDataCatalog.GET_PATH_PARAMETER); // Window.Location.getParameter(GCubeCkanDataCatalog.GET_PATH_PARAMETER);
|
||||||
String queryParameter = paramsMap.get(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);// Window.Location.getParameter(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);
|
String queryParameter = paramsMap.get(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);// Window.Location.getParameter(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);
|
||||||
|
String queryStringParameter = paramsMap.get(GCubeCkanDataCatalog.GET_QUERY_STRING_PARAMETER);
|
||||||
|
|
||||||
|
if (queryStringParameter != null) {
|
||||||
|
GWT.log("Read "+GCubeCkanDataCatalog.GET_QUERY_STRING_PARAMETER+ " as: "+queryStringParameter);
|
||||||
|
String base64DecodeQueryString = QueryStringUtil.base64DecodeQueryString(queryStringParameter);
|
||||||
|
|
||||||
|
ModerationBuilder moderationBuilder = new ModerationQueryStringUtil()
|
||||||
|
.toModerationBuilder(base64DecodeQueryString);
|
||||||
|
if (moderationBuilder != null) {
|
||||||
|
GWT.log("Moderation Builder is: "+moderationBuilder);
|
||||||
|
CkanContentModeratorWidget ccmw = new CkanContentModeratorWidget(moderationBuilder);
|
||||||
|
ccmw.showAsModal("Manage Items");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String browserLocationURL = getBrowserLocationURL();
|
String browserLocationURL = getBrowserLocationURL();
|
||||||
|
|
||||||
GCubeCkanDataCatalog.service.getCKanConnector(browserLocationURL,
|
GCubeCkanDataCatalog.service.getCKanConnector(browserLocationURL, pathParameter, queryParameter,
|
||||||
pathParameter, queryParameter,
|
|
||||||
new AsyncCallback<CkanConnectorAccessPoint>() {
|
new AsyncCallback<CkanConnectorAccessPoint>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(CkanConnectorAccessPoint ckan) {
|
public void onSuccess(CkanConnectorAccessPoint ckan) {
|
||||||
|
|
||||||
if(ckan.isOutsideLoginOnPortal()){
|
if (ckan.isOutsideLoginOnPortal()) {
|
||||||
|
|
||||||
// the portlet is outside the portal and no user is logged
|
// the portlet is outside the portal and no user is logged
|
||||||
// in show only home and statistics
|
// in show only home and statistics
|
||||||
|
@ -124,36 +144,37 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
ckanAccessPoint = ckan;
|
ckanAccessPoint = ckan;
|
||||||
instanceCkanFrame(ckan.buildURI());
|
instanceCkanFrame(ckan.buildURI());
|
||||||
GCubeCkanDataCatalogPanel.this.rootPanel.remove(loading);
|
GCubeCkanDataCatalogPanel.this.rootPanel.remove(loading);
|
||||||
|
|
||||||
String browserLocationURL = getBrowserLocationURL();
|
String browserLocationURL = getBrowserLocationURL();
|
||||||
|
|
||||||
// check if view per organisation is enabled
|
|
||||||
//and performing some actions in this case (e.g. removed the management buttons, etc.)
|
|
||||||
GCubeCkanDataCatalog.service.isViewPerVREEnabled(browserLocationURL, new AsyncCallback<String>() {
|
|
||||||
|
|
||||||
@Override
|
// check if view per organisation is enabled
|
||||||
public void onSuccess(String result) {
|
// and performing some actions in this case (e.g. removed the management
|
||||||
GWT.log("isViewPerVREEnabled?: "+result);
|
// buttons, etc.)
|
||||||
if(result != null && !result.isEmpty()){
|
GCubeCkanDataCatalog.service.isViewPerVREEnabled(browserLocationURL,
|
||||||
// hide all management buttons
|
new AsyncCallback<String>() {
|
||||||
managementPanel.removeGenericManagementButtons();
|
|
||||||
// set real relative path
|
|
||||||
ckanAccessPoint.addPathInfo(result);
|
|
||||||
// save this information
|
|
||||||
viewPerVREPath = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onSuccess(String result) {
|
||||||
|
GWT.log("isViewPerVREEnabled?: " + result);
|
||||||
|
if (result != null && !result.isEmpty()) {
|
||||||
|
// hide all management buttons
|
||||||
|
managementPanel.removeGenericManagementButtons();
|
||||||
|
// set real relative path
|
||||||
|
ckanAccessPoint.addPathInfo(result);
|
||||||
|
// save this information
|
||||||
|
viewPerVREPath = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ?
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
|
||||||
}
|
// ?
|
||||||
});
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if(!ckan.isOutsideLoginOnPortal()){
|
if (!ckan.isOutsideLoginOnPortal()) {
|
||||||
|
|
||||||
// MANAGE CKAN MANAGEMENT PANEL ACCORDING TO MY ROLE
|
// MANAGE CKAN MANAGEMENT PANEL ACCORDING TO MY ROLE
|
||||||
GCubeCkanDataCatalog.service.getMyRole(new AsyncCallback<RolesCkanGroupOrOrg>() {
|
GCubeCkanDataCatalog.service.getMyRole(new AsyncCallback<RolesCkanGroupOrOrg>() {
|
||||||
|
@ -184,60 +205,117 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
});
|
});
|
||||||
|
|
||||||
// retrieve organizations
|
// retrieve organizations
|
||||||
GCubeCkanDataCatalog.service.getCkanOrganizationsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
|
GCubeCkanDataCatalog.service.getCkanOrganizationsNamesAndUrlsForUser(
|
||||||
|
new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
|
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
|
||||||
ckanOrganizationsPanel.setOrganizations(result);
|
ckanOrganizationsPanel.setOrganizations(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
// an error message will be displayed
|
// an error message will be displayed
|
||||||
ckanOrganizationsPanel.setOrganizations(null);
|
ckanOrganizationsPanel.setOrganizations(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// retrieve groups
|
// retrieve groups
|
||||||
GCubeCkanDataCatalog.service.getCkanGroupsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
|
GCubeCkanDataCatalog.service.getCkanGroupsNamesAndUrlsForUser(
|
||||||
|
new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
|
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
|
||||||
ckanGroupsPanel.setGroups(result);
|
ckanGroupsPanel.setGroups(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
ckanGroupsPanel.setGroups(null);
|
ckanGroupsPanel.setGroups(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if the url encodes a revert operation to be performed
|
// check if the url encodes a revert operation to be performed
|
||||||
if(paramsMap.containsKey(GCubeCkanDataCatalog.REVERT_QUERY_PARAM) &&
|
if (paramsMap.containsKey(GCubeCkanDataCatalog.REVERT_QUERY_PARAM)
|
||||||
paramsMap.get(GCubeCkanDataCatalog.REVERT_QUERY_PARAM).equals("true")){
|
&& paramsMap.get(GCubeCkanDataCatalog.REVERT_QUERY_PARAM).equals("true")) {
|
||||||
|
|
||||||
eventBus.fireEvent(new ShowRevertOperationWidgetEvent(Window.Location.getHref()));
|
eventBus.fireEvent(new ShowRevertOperationWidgetEvent(Window.Location.getHref()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final CkanContentModeratorCheckConfigs moderatorcheckConfig = new CkanContentModeratorCheckConfigs();
|
||||||
|
|
||||||
|
final Command whenDone = new Command() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
GWT.log("onConfigurationLoaded executed");
|
||||||
|
boolean isContentModerationEnabled = false;
|
||||||
|
boolean isModeratorRoleAssingned = false;
|
||||||
|
boolean isExistsMyItemInModeration = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
isContentModerationEnabled = moderatorcheckConfig.isContentModerationEnabled();
|
||||||
|
isModeratorRoleAssingned = moderatorcheckConfig.isModeratorRoleAssigned();
|
||||||
|
isExistsMyItemInModeration = moderatorcheckConfig.isExistsMyItemInModeration();
|
||||||
|
} catch (Exception e) {
|
||||||
|
GWT.log("Command - Check configs error: " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
ckanModeratorCheckConfig = moderatorcheckConfig;
|
||||||
|
|
||||||
|
GWT.log("Moderation is enabled? " + isContentModerationEnabled);
|
||||||
|
GWT.log("Moderator role is assigned? " + isModeratorRoleAssingned);
|
||||||
|
GWT.log("isExistsMyItemInModeration? " + isExistsMyItemInModeration);
|
||||||
|
|
||||||
|
// Enabling moderation if the moderation is active in the context and
|
||||||
|
// the user has the role of MODERATOR in the context
|
||||||
|
if (isContentModerationEnabled && isModeratorRoleAssingned) {
|
||||||
|
GWT.log("The moderator role is assigned to user and the moderation is enabled in the context");
|
||||||
|
managementPanel.showManageCMSProductsButton(isContentModerationEnabled);
|
||||||
|
managementPanel.enableManageCMSProductsButton(isContentModerationEnabled);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enabling moderation if the moderation is active in the context and
|
||||||
|
// the user has at least one item under moderation or already moderated
|
||||||
|
if (isContentModerationEnabled && isExistsMyItemInModeration) {
|
||||||
|
GWT.log("The user has at least one item moderated or under moderation, and the moderation is enabled in the context");
|
||||||
|
managementPanel.showManageCMSProductsButton(isContentModerationEnabled);
|
||||||
|
managementPanel.enableManageCMSProductsButton(isContentModerationEnabled);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
moderatorcheckConfig.checkConfigs(whenDone, reloadCatServiceConfig);
|
||||||
|
// reloadCatServiceConfig = false;
|
||||||
|
} catch (Exception e) {
|
||||||
|
GWT.log("Check configs error: " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just check if it is enabled.. then we need to listen for dom events coming
|
* (GRSF) Just check if it is enabled.. then we need to listen for dom events
|
||||||
|
* coming
|
||||||
*/
|
*/
|
||||||
GCubeCkanDataCatalog.service.isManageProductEnabled(new AsyncCallback<Boolean>() {
|
GCubeCkanDataCatalog.service
|
||||||
|
.isManageProductEnabled(new AsyncCallback<ManageProductResponse>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Boolean result) {
|
public void onSuccess(ManageProductResponse manageResponse) {
|
||||||
isManageProductToShow = result;
|
manageProductResponse = manageResponse;
|
||||||
managementPanel.showManageProductButton(isManageProductToShow);
|
if (manageProductResponse != null) {
|
||||||
|
managementPanel.showManageGRSFProductButton(
|
||||||
|
manageProductResponse.isManageEnabled());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
@Override
|
managementPanel.showManageGRSFProductButton(false);
|
||||||
public void onFailure(Throwable caught) {
|
}
|
||||||
isManageProductToShow = false;
|
});
|
||||||
managementPanel.showManageProductButton(isManageProductToShow);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,14 +329,12 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Window.addResizeHandler(new ResizeHandler() {
|
Window.addResizeHandler(new ResizeHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResize(ResizeEvent event) {
|
public void onResize(ResizeEvent event) {
|
||||||
|
|
||||||
GWT.log("onWindowResized width: " + event.getWidth() +
|
GWT.log("onWindowResized width: " + event.getWidth() + " height: " + event.getHeight());
|
||||||
" height: " + event.getHeight());
|
|
||||||
updateSize();
|
updateSize();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -269,47 +345,45 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
|
|
||||||
// listen for DOM messages
|
// listen for DOM messages
|
||||||
listenForPostMessage();
|
listenForPostMessage();
|
||||||
|
|
||||||
|
|
||||||
CkanToZenodoPublisherServiceAsync.Util.getInstance().checkZenodoEnvironment(new AsyncCallback<Boolean>() {
|
CkanToZenodoPublisherServiceAsync.Util.getInstance().checkZenodoEnvironment(new AsyncCallback<Boolean>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
managementPanel.visibilityPublishOnZenodoButton(false);
|
managementPanel.visibilityPublishOnZenodoButton(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Boolean result) {
|
public void onSuccess(Boolean result) {
|
||||||
GWT.log("checkZenodoEnvironment result: "+result);
|
GWT.log("checkZenodoEnvironment result: " + result);
|
||||||
managementPanel.visibilityPublishOnZenodoButton(result);
|
managementPanel.visibilityPublishOnZenodoButton(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the browser location URL.
|
* Gets the browser location URL.
|
||||||
*
|
*
|
||||||
* @return the browser location URL
|
* @return the browser location URL
|
||||||
*/
|
*/
|
||||||
public String getBrowserLocationURL() {
|
public String getBrowserLocationURL() {
|
||||||
|
|
||||||
String browserLocationURL = null;
|
String browserLocationURL = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
browserLocationURL = Window.Location.getHref();
|
browserLocationURL = Window.Location.getHref();
|
||||||
}catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// silent
|
// silent
|
||||||
}
|
}
|
||||||
|
|
||||||
GWT.log("Returning browserLocationURL: "+browserLocationURL);
|
GWT.log("Returning browserLocationURL: " + browserLocationURL);
|
||||||
return browserLocationURL;
|
return browserLocationURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLatestSelectedProductIdentifier(){
|
public static String getLatestSelectedProductIdentifier() {
|
||||||
return latestSelectedProductIdentifier;
|
return latestSelectedProductIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,8 +402,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
/**
|
/**
|
||||||
* Sets the top panel visible.
|
* Sets the top panel visible.
|
||||||
*
|
*
|
||||||
* @param bool
|
* @param bool the new top panel visible
|
||||||
* the new top panel visible
|
|
||||||
*/
|
*/
|
||||||
public void setTopPanelVisible(boolean bool) {
|
public void setTopPanelVisible(boolean bool) {
|
||||||
|
|
||||||
|
@ -340,8 +413,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
/**
|
/**
|
||||||
* show or hide edit/insert buttons according to the role.
|
* show or hide edit/insert buttons according to the role.
|
||||||
*
|
*
|
||||||
* @param show
|
* @param show the show
|
||||||
* the show
|
|
||||||
*/
|
*/
|
||||||
public void showEditInsertButtons(boolean show) {
|
public void showEditInsertButtons(boolean show) {
|
||||||
|
|
||||||
|
@ -351,8 +423,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
/**
|
/**
|
||||||
* Instance ckan frame.
|
* Instance ckan frame.
|
||||||
*
|
*
|
||||||
* @param ckanUrlConnector
|
* @param ckanUrlConnector the ckan url connector
|
||||||
* the ckan url connector
|
|
||||||
* @return the frame
|
* @return the frame
|
||||||
*/
|
*/
|
||||||
public Frame instanceCkanFrame(String ckanUrlConnector) {
|
public Frame instanceCkanFrame(String ckanUrlConnector) {
|
||||||
|
@ -384,16 +455,15 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
* Update window size.
|
* Update window size.
|
||||||
*/
|
*/
|
||||||
public void updateSize() {
|
public void updateSize() {
|
||||||
/*RootPanel workspace = rootPanel;
|
/*
|
||||||
int topBorder = workspace.getAbsoluteTop();
|
* RootPanel workspace = rootPanel; int topBorder = workspace.getAbsoluteTop();
|
||||||
GWT.log("top: "+topBorder);
|
* GWT.log("top: "+topBorder); int footer = 30; // 85 footer is bottombar +
|
||||||
int footer = 30; // 85 footer is bottombar + sponsor
|
* sponsor int rootHeight = Window.getClientHeight() - topBorder - 5 - footer;
|
||||||
int rootHeight = Window.getClientHeight() - topBorder - 5 - footer;
|
* int height = rootHeight - getTopPanelHeight(); if (ckanFramePanel.getFrame()
|
||||||
int height = rootHeight - getTopPanelHeight();
|
* != null) { int newH =managementPanel != null &&
|
||||||
if (ckanFramePanel.getFrame() != null) {
|
* managementPanel.getCurrentHeight() > 0 ? managementPanel.getOffsetHeight() +
|
||||||
int newH =managementPanel != null && managementPanel.getCurrentHeight() > 0 ? managementPanel.getOffsetHeight() + height : height;
|
* height : height; ckanFramePanel.getFrame().setHeight(2000+"px"); }
|
||||||
ckanFramePanel.getFrame().setHeight(2000+"px");
|
*/
|
||||||
}*/
|
|
||||||
|
|
||||||
RootPanel workspace = this.rootPanel;
|
RootPanel workspace = this.rootPanel;
|
||||||
int topBorder = workspace.getAbsoluteTop();
|
int topBorder = workspace.getAbsoluteTop();
|
||||||
|
@ -401,14 +471,17 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
int rootHeight = Window.getClientHeight() - topBorder - 5 - footer;
|
int rootHeight = Window.getClientHeight() - topBorder - 5 - footer;
|
||||||
int height = rootHeight - getTopPanelHeight();
|
int height = rootHeight - getTopPanelHeight();
|
||||||
if (this.ckanFramePanel.getFrame() != null) {
|
if (this.ckanFramePanel.getFrame() != null) {
|
||||||
int newH = this.managementPanel != null &&this.managementPanel.getCurrentHeight() > 0? this.managementPanel.getOffsetHeight() + height : height;
|
int newH = this.managementPanel != null && this.managementPanel.getCurrentHeight() > 0
|
||||||
|
? this.managementPanel.getOffsetHeight() + height
|
||||||
|
: height;
|
||||||
this.ckanFramePanel.getFrame().setHeight(newH + "px");
|
this.ckanFramePanel.getFrame().setHeight(newH + "px");
|
||||||
}
|
}
|
||||||
// workspace.setHeight(height+"px");
|
// workspace.setHeight(height+"px");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a message
|
* Print a message
|
||||||
|
*
|
||||||
* @param string
|
* @param string
|
||||||
*/
|
*/
|
||||||
protected native void printString(String string) /*-{
|
protected native void printString(String string) /*-{
|
||||||
|
@ -419,71 +492,78 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
* Listen for post message.
|
* Listen for post message.
|
||||||
*/
|
*/
|
||||||
private final native void listenForPostMessage() /*-{
|
private final native void listenForPostMessage() /*-{
|
||||||
var that = this;
|
var that = this;
|
||||||
$wnd.addEventListener("message", function(msg) {
|
$wnd
|
||||||
console.log("read message...");
|
.addEventListener(
|
||||||
that.@org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view.GCubeCkanDataCatalogPanel::onPostMessage(Ljava/lang/String;Ljava/lang/String;)(msg.data, msg.origin);
|
"message",
|
||||||
});
|
function(msg) {
|
||||||
|
console.log("read message...");
|
||||||
|
that.@org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view.GCubeCkanDataCatalogPanel::onPostMessage(Ljava/lang/String;Ljava/lang/String;)(msg.data, msg.origin);
|
||||||
|
});
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On post message.
|
* On post message.
|
||||||
*
|
*
|
||||||
* @param data the data
|
* @param data the data
|
||||||
* @param origin the origin
|
* @param origin the origin
|
||||||
*/
|
*/
|
||||||
private void onPostMessage(String data, String origin) {
|
private void onPostMessage(String data, String origin) {
|
||||||
printString("Read data: "+data+", from origin: "+origin);
|
printString("Read data: " + data + ", from origin: " + origin);
|
||||||
printString("Ckan base url: "+ckanAccessPoint.getBaseUrl());
|
printString("Ckan base url: " + ckanAccessPoint.getBaseUrl());
|
||||||
|
|
||||||
// parsing data.. it is a json bean of the type
|
// parsing data.. it is a json bean of the type
|
||||||
printString("Incoming message is " + data + " from " + origin);
|
printString("Incoming message is " + data + " from " + origin);
|
||||||
|
|
||||||
if (ckanAccessPoint.getBaseUrl().indexOf(origin)>=0) {
|
if (ckanAccessPoint.getBaseUrl().indexOf(origin) >= 0) {
|
||||||
// The data has been sent from your site
|
// The data has been sent from your site
|
||||||
// The data sent with postMessage is stored in event.data
|
// The data sent with postMessage is stored in event.data
|
||||||
String height = null;
|
String height = null;
|
||||||
String productId = null;
|
String productId = null;
|
||||||
boolean isProductKeyMissing = false;
|
boolean isProductKeyMissing = false;
|
||||||
|
|
||||||
try{
|
try {
|
||||||
JSONValue parsedJSON = JSONParser.parseStrict(data);
|
JSONValue parsedJSON = JSONParser.parseStrict(data);
|
||||||
JSONObject object = parsedJSON.isObject();
|
JSONObject object = parsedJSON.isObject();
|
||||||
GWT.log("Object is " + object);
|
GWT.log("Object is " + object);
|
||||||
if(object != null){
|
if (object != null) {
|
||||||
//Supporting Task #12286: parsing the translate values for 'dataset', 'organization' and so on
|
// Supporting Task #12286: parsing the translate values for 'dataset',
|
||||||
if(object.containsKey("translate")){
|
// 'organization' and so on
|
||||||
|
if (object.containsKey("translate")) {
|
||||||
JSONObject theTranslate = (JSONObject) object.get("translate");
|
JSONObject theTranslate = (JSONObject) object.get("translate");
|
||||||
GWT.log("theTranslate is " + object);
|
GWT.log("theTranslate is " + object);
|
||||||
for (String key : theTranslate.keySet()) {
|
for (String key : theTranslate.keySet()) {
|
||||||
//GWT.log("theTranslate key " + key);
|
// GWT.log("theTranslate key " + key);
|
||||||
String value = theTranslate.get(key).isString().stringValue();
|
String value = theTranslate.get(key).isString().stringValue();
|
||||||
printString("Customizing navigation link '" + key +"' with translate: "+value);
|
printString("Customizing navigation link '" + key + "' with translate: " + value);
|
||||||
managementPanel.customizeLabelAccordingTranslate(key,value);
|
managementPanel.customizeLabelAccordingTranslate(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(object.containsKey("height")){
|
} else if (object.containsKey("height")) {
|
||||||
|
|
||||||
height = object.get("height").isString().stringValue();
|
height = object.get("height").isString().stringValue();
|
||||||
if(object.containsKey("product"))
|
if (object.containsKey("product"))
|
||||||
productId = object.get("product").isString().stringValue();
|
productId = object.get("product").isString().stringValue();
|
||||||
else
|
else
|
||||||
isProductKeyMissing = true;
|
isProductKeyMissing = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
GWT.log("Exception is " + e);
|
GWT.log("Exception is " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(height != null)
|
if (height != null)
|
||||||
setIFrameHeight(height.toString());
|
setIFrameHeight(height.toString());
|
||||||
|
|
||||||
// show or hide the manage product button
|
// show or hide the manage product button
|
||||||
if(!isProductKeyMissing){
|
if (!isProductKeyMissing) {
|
||||||
latestSelectedProductIdentifier = productId.toString();
|
latestSelectedProductIdentifier = productId.toString();
|
||||||
managementPanel.enableShareItemButton(productId != null && !productId.isEmpty());
|
managementPanel.enableShareItemButton(productId != null && !productId.isEmpty());
|
||||||
managementPanel.enablePublishOnZenodoButton(productId != null && !productId.isEmpty());
|
managementPanel.enablePublishOnZenodoButton(productId != null && !productId.isEmpty());
|
||||||
managementPanel.enableManageProductButton(productId != null && !productId.isEmpty() && isManageProductToShow);
|
managementPanel.enableManageGRSFProductButton(
|
||||||
|
productId != null && !productId.isEmpty() && manageProductResponse.isManageEnabled());
|
||||||
|
// managementPanel.enableManageCMSProductsButton(productId != null &&
|
||||||
|
// !productId.isEmpty() && moderationProductResponse.isManageEnabled());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// The data hasn't been sent from your site!
|
// The data hasn't been sent from your site!
|
||||||
|
@ -493,30 +573,43 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the i frame height.
|
* Sets the i frame height.
|
||||||
*
|
*
|
||||||
* @param height the new i frame height
|
* @param height the new i frame height
|
||||||
*/
|
*/
|
||||||
private void setIFrameHeight(String height){
|
private void setIFrameHeight(String height) {
|
||||||
String parsedHeight = null;
|
String parsedHeight = null;
|
||||||
if(height==null || height.isEmpty())
|
if (height == null || height.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(height.contains("px")){
|
if (height.contains("px")) {
|
||||||
parsedHeight = height;
|
parsedHeight = height;
|
||||||
}else{
|
|
||||||
try{
|
// Setting parsedHeight to null if the height is 0px
|
||||||
|
String checkHeight = height;
|
||||||
|
checkHeight = checkHeight.replaceAll("px", "");
|
||||||
|
try {
|
||||||
|
int intH = Integer.parseInt(checkHeight);
|
||||||
|
if (intH == 0) {
|
||||||
|
parsedHeight = null;
|
||||||
|
printString("height is 0px so setting parsedHeight = null");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
int intH = Integer.parseInt(height);
|
int intH = Integer.parseInt(height);
|
||||||
parsedHeight = intH + " px";
|
parsedHeight = intH + " px";
|
||||||
}catch(Exception e ){
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parsedHeight!=null){
|
if (parsedHeight != null) {
|
||||||
GWT.log("Setting new height for ckan iFrame: "+height);
|
GWT.log("Setting new height for ckan iFrame: " + height);
|
||||||
this.ckanFramePanel.getFrame().setHeight(height);
|
this.ckanFramePanel.getFrame().setHeight(height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,9 +626,10 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the catalogue url (e.g. http://ckan-d-d4s.d4science.org:443/)
|
* Return the catalogue url (e.g. http://ckan-d-d4s.d4science.org:443/)
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getCatalogueUrl(){
|
public String getCatalogueUrl() {
|
||||||
|
|
||||||
printString("Base url for iframe is " + ckanAccessPoint.getCatalogueBaseUrl());
|
printString("Base url for iframe is " + ckanAccessPoint.getCatalogueBaseUrl());
|
||||||
return ckanAccessPoint.getCatalogueBaseUrl();
|
return ckanAccessPoint.getCatalogueBaseUrl();
|
||||||
|
@ -583,11 +677,12 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show management panel
|
* Show management panel
|
||||||
|
*
|
||||||
* @param show
|
* @param show
|
||||||
*/
|
*/
|
||||||
public void showManagementPanel(boolean show){
|
public void showManagementPanel(boolean show) {
|
||||||
|
|
||||||
managementPanel.showManageProductButton(show);
|
managementPanel.showManageGRSFProductButton(show);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,4 +693,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
return viewPerVREPath != null;
|
return viewPerVREPath != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CkanContentModeratorCheckConfigs getCkanModeratorConfig() {
|
||||||
|
return ckanModeratorCheckConfig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCat
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.thread.UpdateItemCatalogueResource;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.thread.UpdateItemCatalogueResource;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductResponse;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
|
||||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||||
|
@ -332,10 +333,10 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
||||||
// String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
|
// String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
|
||||||
//
|
//
|
||||||
// CkanConnectorAccessPoint ckanAP = SessionUtil.getCkanAccessPoint(this.getThreadLocalRequest().getSession(), scopePerCurrentUrl);
|
// CkanConnectorAccessPoint ckanAP = SessionUtil.getCkanAccessPoint(this.getThreadLocalRequest().getSession(), scopePerCurrentUrl);
|
||||||
// logger.info("Logout from CKAN for: "+username +" by token: "+ckanAP.getGcubeTokenValue());
|
// LOG.info("Logout from CKAN for: "+username +" by token: "+ckanAP.getGcubeTokenValue());
|
||||||
//
|
//
|
||||||
// String ckanConnectorLogut = getServletContext().getInitParameter(CKANCONNECTORLOGOUT);
|
// String ckanConnectorLogut = getServletContext().getInitParameter(CKANCONNECTORLOGOUT);
|
||||||
// logger.debug(CKANCONNECTORLOGOUT + " is: "+ckanConnectorLogut);
|
// LOG.debug(CKANCONNECTORLOGOUT + " is: "+ckanConnectorLogut);
|
||||||
//
|
//
|
||||||
// CkanConnectorAccessPoint ckan = new CkanConnectorAccessPoint(ckanAP.getBaseUrl(), ckanConnectorLogut);
|
// CkanConnectorAccessPoint ckan = new CkanConnectorAccessPoint(ckanAP.getBaseUrl(), ckanConnectorLogut);
|
||||||
// ckan.addGubeToken(ckanAP.getGcubeTokenValue());
|
// ckan.addGubeToken(ckanAP.getGcubeTokenValue());
|
||||||
|
@ -506,25 +507,54 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
||||||
* @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#isManageProductEnabled()
|
* @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#isManageProductEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isManageProductEnabled() {
|
public ManageProductResponse isManageProductEnabled() {
|
||||||
logger.info("Checking if the manage product button needs to be shown or not for the current context");
|
logger.info("Checking if the manage product button needs to be shown or not for the current context");
|
||||||
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
|
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
|
||||||
DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl);
|
DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl);
|
||||||
if(catalogue == null){
|
if(catalogue == null){
|
||||||
logger.warn("There is no catalogue instance here..., returning false");
|
logger.warn("There is no catalogue instance here..., returning false");
|
||||||
return false;
|
return new ManageProductResponse(false, scopePerCurrentUrl);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
try{
|
try{
|
||||||
boolean toReturn = catalogue.isManageProductEnabled();
|
boolean isManageProductEnabled = catalogue.isManageProductEnabled();
|
||||||
logger.info("Will manage product be enabled for this user? " + Boolean.toString(toReturn));
|
logger.info("isManageProductEnabled: "+isManageProductEnabled);
|
||||||
return toReturn;
|
|
||||||
|
//TO BE SURE THAT THE CURRENT CONTEXT IS A GRSF SCOPE FOR ENABLING THE "MANAGE GRSF ITEM"
|
||||||
|
boolean isGRSFContext = false;
|
||||||
|
if (scopePerCurrentUrl != null) {
|
||||||
|
if (scopePerCurrentUrl.toLowerCase().contains("grsf")) {
|
||||||
|
isGRSFContext = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("isGRSFContext: "+isGRSFContext);
|
||||||
|
|
||||||
|
boolean toReturn = false;
|
||||||
|
if(isGRSFContext && isManageProductEnabled) {
|
||||||
|
toReturn = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("returning manage enabled: "+toReturn);
|
||||||
|
ManageProductResponse mpr = new ManageProductResponse(toReturn, scopePerCurrentUrl);
|
||||||
|
logger.info("Will manage product be enabled for this user? " + mpr);
|
||||||
|
return mpr;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("Unable to determine if the manage product needs to be shown or not", e);
|
logger.error("Unable to determine if the manage product needs to be shown or not", e);
|
||||||
return false;
|
return new ManageProductResponse(false, scopePerCurrentUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ManageProductResponse checkModerationEnabled(boolean reloadConfig) {
|
||||||
|
logger.info("Checking if the moderation is enabled in the current context, reload config? "+reloadConfig);
|
||||||
|
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
|
||||||
|
DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl);
|
||||||
|
boolean moderationEnabled = catalogue.isModerationEnabled(reloadConfig);
|
||||||
|
return new ManageProductResponse(moderationEnabled, scopePerCurrentUrl);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask to liferay.
|
* Ask to liferay.
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class SessionUtil {
|
||||||
public static final String CKAN_END_POINT = "CKAN_END_POINT";
|
public static final String CKAN_END_POINT = "CKAN_END_POINT";
|
||||||
public static final String CKAN_ACCESS_POINT = "CKAN_ACCESS_POINT";
|
public static final String CKAN_ACCESS_POINT = "CKAN_ACCESS_POINT";
|
||||||
public static final String GCUBE_REQUEST_URL = "gcube-request-url";
|
public static final String GCUBE_REQUEST_URL = "gcube-request-url";
|
||||||
//private static Logger logger = LoggerFactory.getLogger(SessionUtil.class);
|
//private static Logger LOG = LoggerFactory.getLogger(SessionUtil.class);
|
||||||
private static final Log logger = LogFactoryUtil.getLog(SessionUtil.class);
|
private static final Log logger = LogFactoryUtil.getLog(SessionUtil.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -42,7 +42,7 @@ import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||||
*/
|
*/
|
||||||
public class UserUtil {
|
public class UserUtil {
|
||||||
|
|
||||||
//private static Logger logger = LoggerFactory.getLogger(UserUtil.class);
|
//private static Logger LOG = LoggerFactory.getLogger(UserUtil.class);
|
||||||
private static final Log logger = LogFactoryUtil.getLog(UserUtil.class);
|
private static final Log logger = LogFactoryUtil.getLog(UserUtil.class);
|
||||||
|
|
||||||
private static final String ADD_USER_TO_OTHER_ORG_KEY = "ADD_USER_TO_OTHER_ORG_KEY";
|
private static final String ADD_USER_TO_OTHER_ORG_KEY = "ADD_USER_TO_OTHER_ORG_KEY";
|
||||||
|
|
|
@ -24,20 +24,20 @@ import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.xml.sax.InputSource;
|
import org.xml.sax.InputSource;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This thread is scheduled to update the resource related to org.gcube.datacatalogue.ProductCatalogue
|
* This thread is scheduled to update the resource related to
|
||||||
|
* org.gcube.datacatalogue.ProductCatalogue
|
||||||
* {org.gcube.portlets.widgets.ckandatapublisherwidget.server.threads}
|
* {org.gcube.portlets.widgets.ckandatapublisherwidget.server.threads}
|
||||||
|
*
|
||||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
*/
|
*/
|
||||||
public class UpdateItemCatalogueResource extends Thread{
|
public class UpdateItemCatalogueResource extends Thread {
|
||||||
|
|
||||||
private String currentScope;
|
private String currentScope;
|
||||||
private String cleanUrl;
|
private String cleanUrl;
|
||||||
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(UpdateItemCatalogueResource.class);
|
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(UpdateItemCatalogueResource.class);
|
||||||
|
|
||||||
public static final String APPLICATION_ID_CATALOGUE_MANAGER = "gCat";
|
|
||||||
|
|
||||||
|
public static final String APP_ID_CATALOGUE_APPLICATION_PROFILE = "service-account-gcat";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param currentScope
|
* @param currentScope
|
||||||
|
@ -52,55 +52,57 @@ public class UpdateItemCatalogueResource extends Thread{
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
try{
|
try {
|
||||||
|
|
||||||
if(cleanUrl == null || cleanUrl.isEmpty() || currentScope==null || currentScope.isEmpty()){
|
if (cleanUrl == null || cleanUrl.isEmpty() || currentScope == null || currentScope.isEmpty()) {
|
||||||
logger.warn("One or more arguments {}{} is wrong. Exiting", currentScope, cleanUrl);
|
logger.warn("One or more arguments {}{} is wrong. Exiting", currentScope, cleanUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScopeBean scope = new ScopeBean(currentScope);
|
ScopeBean scope = new ScopeBean(currentScope);
|
||||||
if(!scope.is(Type.VRE)){
|
if (!scope.is(Type.VRE)) {
|
||||||
logger.warn("{} is not a VRE scope", currentScope);
|
logger.warn("{} is not a VRE scope", currentScope);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the scope of the root infrastructure
|
// set the scope of the root infrastructure
|
||||||
String rootInfrastructure = getRootScope();
|
String rootInfrastructure = getRootScope();
|
||||||
ScopeProvider.instance.set("/"+rootInfrastructure);
|
ScopeProvider.instance.set("/" + rootInfrastructure);
|
||||||
|
|
||||||
// check if the resource is present
|
// check if the resource is present
|
||||||
Query q = new QueryBox("for $profile in collection('/db/Profiles/GenericResource')//Resource " +
|
Query q = new QueryBox("for $profile in collection('/db/Profiles/GenericResource')//Resource "
|
||||||
"where $profile/Profile/SecondaryType/string() eq 'ApplicationProfile' and $profile/Profile/Body/AppId/string() " +
|
+ "where $profile/Profile/SecondaryType/string() eq 'ApplicationProfile' and $profile/Profile/Body/AppId/string() "
|
||||||
" eq '" + APPLICATION_ID_CATALOGUE_MANAGER + "'" +
|
+ " eq '" + APP_ID_CATALOGUE_APPLICATION_PROFILE + "'" + "return $profile");
|
||||||
"return $profile");
|
|
||||||
|
|
||||||
DiscoveryClient<String> client = client();
|
DiscoveryClient<String> client = client();
|
||||||
List<String> appProfile = client.submit(q);
|
List<String> appProfile = client.submit(q);
|
||||||
|
|
||||||
if (appProfile == null || appProfile.size() == 0)
|
if (appProfile == null || appProfile.size() == 0)
|
||||||
throw new Exception("this applicationProfile is not registered in the infrastructure");
|
throw new Exception("this applicationProfile is not registered in the infrastructure");
|
||||||
else{
|
else {
|
||||||
|
|
||||||
String elem = appProfile.get(0);
|
String elem = appProfile.get(0);
|
||||||
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||||
Node node = docBuilder.parse(new InputSource(new StringReader(elem))).getDocumentElement();
|
Node node = docBuilder.parse(new InputSource(new StringReader(elem))).getDocumentElement();
|
||||||
XPathHelper helper = new XPathHelper(node);
|
XPathHelper helper = new XPathHelper(node);
|
||||||
|
|
||||||
// look for the scope
|
// look for the scope
|
||||||
List<String> currValue = null;
|
List<String> currValue = null;
|
||||||
currValue = helper.evaluate(String.format("/Resource/Profile/Body/EndPoint/Scope/text()[.='%s']", scope));
|
currValue = helper
|
||||||
|
.evaluate(String.format("/Resource/Profile/Body/EndPoint/Scope/text()[.='%s']", scope));
|
||||||
logger.debug("Result is " + currValue);
|
logger.debug("Result is " + currValue);
|
||||||
|
|
||||||
if (currValue == null || currValue.isEmpty()) {
|
if (currValue == null || currValue.isEmpty()) {
|
||||||
logger.info("Adding the following url " + cleanUrl);
|
logger.info("Adding the following url " + cleanUrl);
|
||||||
|
|
||||||
String endpoint2Add = "<EndPoint><Scope>"+currentScope+"</Scope><URL>"+cleanUrl+"</URL></EndPoint>";
|
String endpoint2Add = "<EndPoint><Scope>" + currentScope + "</Scope><URL>" + cleanUrl
|
||||||
|
+ "</URL></EndPoint>";
|
||||||
GenericResource toUpdate = clientFor(GenericResource.class).submit(q).get(0);
|
GenericResource toUpdate = clientFor(GenericResource.class).submit(q).get(0);
|
||||||
try {
|
try {
|
||||||
docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||||
Element body = toUpdate.profile().body();
|
Element body = toUpdate.profile().body();
|
||||||
Node fragmentNode = docBuilder.parse(new InputSource(new StringReader(endpoint2Add))).getDocumentElement();
|
Node fragmentNode = docBuilder.parse(new InputSource(new StringReader(endpoint2Add)))
|
||||||
|
.getDocumentElement();
|
||||||
fragmentNode = body.getOwnerDocument().importNode(fragmentNode, true);
|
fragmentNode = body.getOwnerDocument().importNode(fragmentNode, true);
|
||||||
body.appendChild(fragmentNode);
|
body.appendChild(fragmentNode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -111,20 +113,21 @@ public class UpdateItemCatalogueResource extends Thread{
|
||||||
logger.info("Resource updated!");
|
logger.info("Resource updated!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("Failed to execute this check", e);
|
logger.error("Failed to execute this check", e);
|
||||||
}finally{
|
} finally {
|
||||||
ScopeProvider.instance.reset();
|
ScopeProvider.instance.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getRootScope() throws Exception{
|
private String getRootScope() throws Exception {
|
||||||
|
|
||||||
if(currentScope == null || currentScope.isEmpty())
|
if (currentScope == null || currentScope.isEmpty())
|
||||||
throw new Exception("Scope was not specified");
|
throw new Exception("Scope was not specified");
|
||||||
|
|
||||||
return currentScope.split("/")[1];
|
return currentScope.split("/")[1];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ManageProductResponse.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Feb 17, 2022
|
||||||
|
*/
|
||||||
|
public class ManageProductResponse implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 4042294108868246495L;
|
||||||
|
// Is GRSF MANAGE in the GRSF context, Is gCat moderation in the other contexts
|
||||||
|
private boolean isManageEnabled = false;
|
||||||
|
private String scope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new manage product response.
|
||||||
|
*/
|
||||||
|
public ManageProductResponse() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new manage product response.
|
||||||
|
*
|
||||||
|
* @param isManageEnabled the is manage enabled
|
||||||
|
* @param scope the scope
|
||||||
|
*/
|
||||||
|
public ManageProductResponse(boolean isManageEnabled, String scope) {
|
||||||
|
this.isManageEnabled = isManageEnabled;
|
||||||
|
this.scope = scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if is manage enabled.
|
||||||
|
*
|
||||||
|
* @return true, if is manage enabled
|
||||||
|
*/
|
||||||
|
public boolean isManageEnabled() {
|
||||||
|
return isManageEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the scope.
|
||||||
|
*
|
||||||
|
* @return the scope
|
||||||
|
*/
|
||||||
|
public String getScope() {
|
||||||
|
return scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the manage enabled.
|
||||||
|
*
|
||||||
|
* @param isManageEnabled the new manage enabled
|
||||||
|
*/
|
||||||
|
public void setManageEnabled(boolean isManageEnabled) {
|
||||||
|
this.isManageEnabled = isManageEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the scope.
|
||||||
|
*
|
||||||
|
* @param scope the new scope
|
||||||
|
*/
|
||||||
|
public void setScope(String scope) {
|
||||||
|
this.scope = scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To string.
|
||||||
|
*
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("ManageProductResponse [isManageEnabled=");
|
||||||
|
builder.append(isManageEnabled);
|
||||||
|
builder.append(", scope=");
|
||||||
|
builder.append(scope);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,24 +14,32 @@
|
||||||
<!-- Other module inherits -->
|
<!-- Other module inherits -->
|
||||||
<inherits name="com.google.gwt.json.JSON" />
|
<inherits name="com.google.gwt.json.JSON" />
|
||||||
<!-- Inherits widget -->
|
<!-- Inherits widget -->
|
||||||
|
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||||
|
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
|
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
||||||
<inherits name='org.gcube.datacatalogue.grsf_manage_widget.GRSFManageWidget' />
|
<inherits
|
||||||
<inherits name='org.gcube.datacatalogue.utillibrary.CkanUtilLibrary' />
|
name='org.gcube.datacatalogue.grsf_manage_widget.GRSFManageWidget' />
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
<inherits
|
||||||
|
name='org.gcube.datacatalogue.utillibrary.CkanUtilLibrary' />
|
||||||
|
<inherits
|
||||||
|
name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
<inherits
|
||||||
<inherits name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
||||||
|
<inherits
|
||||||
|
name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
||||||
|
<inherits
|
||||||
|
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
<entry-point
|
||||||
|
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
|
@ -148,4 +148,13 @@ h1 {
|
||||||
.button-as-role-style {
|
.button-as-role-style {
|
||||||
padding-left: 0px !important;
|
padding-left: 0px !important;
|
||||||
color: black !important;
|
color: black !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content-moderator {
|
||||||
|
width: 1200px;
|
||||||
|
min-height: 720px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content-moderator .modal-body {
|
||||||
|
min-height: 720px;
|
||||||
}
|
}
|
|
@ -55,12 +55,23 @@
|
||||||
<servlet-class>org.gcube.portlets_widgets.catalogue_sharing_widget.server.ShareServicesImpl</servlet-class>
|
<servlet-class>org.gcube.portlets_widgets.catalogue_sharing_widget.server.ShareServicesImpl</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<!-- Servlets -->
|
<!-- Servlets -->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>ckanToZenodoServlet</servlet-name>
|
<servlet-name>ckanToZenodoServlet</servlet-name>
|
||||||
<servlet-class>org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoPublisherServiceImpl</servlet-class>
|
<servlet-class>org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoPublisherServiceImpl</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>ckanContentModeratorServlet</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.widgets.ckancontentmoderator.server.CkanContentModeratorServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ckanContentModeratorServlet</servlet-name>
|
||||||
|
<url-pattern>/gCubeCkanDataCatalog/ckanContentModeratorService</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>ckanToZenodoServlet</servlet-name>
|
<servlet-name>ckanToZenodoServlet</servlet-name>
|
||||||
<url-pattern>/gCubeCkanDataCatalog/ckantozenodo</url-pattern>
|
<url-pattern>/gCubeCkanDataCatalog/ckantozenodo</url-pattern>
|
||||||
|
|
Loading…
Reference in New Issue