in progress integration with CMS
This commit is contained in:
parent
fd8655c220
commit
7c6049c48d
37
.classpath
37
.classpath
|
@ -1,11 +1,22 @@
|
||||||
<?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.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.1.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"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/gcube-ckan-datacatalog-2.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
|
@ -13,28 +24,16 @@
|
||||||
<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.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<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.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
>>>>>>>=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.0.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.1.0-SNAPSHOT
|
||||||
>>>>>>> refs/heads/task_20699
|
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -1,37 +1,119 @@
|
||||||
<?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">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="gcube-ckan-datacatalog-2.0.0-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="gcube-ckan-datacatalog-2.1.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project-modules>
|
</project-modules>
|
||||||
|
|
|
@ -5,6 +5,12 @@ 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.0-SNAPSHOT] - 2021-06-15
|
||||||
|
|
||||||
|
#### Enhancements
|
||||||
|
|
||||||
|
[#20650] Data Catalogue: integrate the Content Moderator System
|
||||||
|
|
||||||
## [v2.0.1] - 2021-05-04
|
## [v2.0.1] - 2021-05-04
|
||||||
|
|
||||||
#### Enhancements
|
#### Enhancements
|
||||||
|
|
30
pom.xml
30
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.0.1</version>
|
<version>2.1.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>
|
||||||
|
|
||||||
|
@ -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>[0.0.1, 1.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
|
|
@ -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,8 @@ 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.CkanContentModeratorWidget;
|
||||||
|
import org.gcube.portlets.widgets.ckancontentmoderator.client.ui.table.ItemsTable.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;
|
||||||
|
|
||||||
|
@ -39,6 +44,8 @@ import com.github.gwtbootstrap.client.ui.Modal;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.event.shared.HandlerManager;
|
import com.google.gwt.event.shared.HandlerManager;
|
||||||
|
import com.google.gwt.user.client.Command;
|
||||||
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,6 +239,39 @@ public class CkanEventHandlerManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
eventBus.addHandler(ClickedCMSManageProductButtonEvent.TYPE, new ClickedCMSManageProductButtonEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClickedManageProduct(ClickedCMSManageProductButtonEvent showManageProductWidgetEvent) {
|
||||||
|
final CkanContentModeratorWidget cms = new CkanContentModeratorWidget(DISPLAY_FIELD.values(), DISPLAY_FIELD.TITLE);
|
||||||
|
Modal modal = new Modal(true);
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
cms.isContentModeratorEnabled(new Command() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
try {
|
||||||
|
cms.loadItemsForStatus(ItemStatus.PENDING);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Window.alert(e.getMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Window.alert(e.getMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modal.add(cms.getPanel());
|
||||||
|
modal.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
eventBus.addHandler(ShowRevertOperationWidgetEvent.TYPE, new ShowRevertOperationWidgetEventHandler() {
|
eventBus.addHandler(ShowRevertOperationWidgetEvent.TYPE, new ShowRevertOperationWidgetEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onShowRevertOperationWidgetEvent(
|
public void onShowRevertOperationWidgetEvent(
|
||||||
|
|
|
@ -5,6 +5,7 @@ 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;
|
||||||
|
@ -73,7 +74,7 @@ public interface GcubeCkanDataCatalogService extends RemoteService {
|
||||||
* 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
|
||||||
*/
|
*/
|
||||||
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.
|
||||||
|
|
|
@ -8,11 +8,13 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Interface GcubeCkanDataCatalogServiceAsync.
|
* The Interface GcubeCkanDataCatalogServiceAsync.
|
||||||
*
|
*
|
||||||
|
@ -67,12 +69,13 @@ public interface GcubeCkanDataCatalogServiceAsync {
|
||||||
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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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 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);
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
@ -29,24 +30,26 @@ import com.google.gwt.event.shared.HandlerManager;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.InlineHTML;
|
import com.google.gwt.user.client.ui.InlineHTML;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class CkanMetadataManagementPanel.
|
* The Class CkanMetadataManagementPanel.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* @author Costantino Perciante costantino.perciante@isti.cnr.it
|
* @author Costantino Perciante costantino.perciante@isti.cnr.it Jun 9, 2016
|
||||||
* Jun 9, 2016
|
*
|
||||||
*/
|
*/
|
||||||
public class CkanMetadataManagementPanel extends FlowPanel{
|
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
|
||||||
|
@ -71,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");
|
||||||
|
private Button manageCMS = new Button("Manage Items");
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -79,10 +83,10 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
*
|
*
|
||||||
* @param eventBus the event bus
|
* @param eventBus the event bus
|
||||||
*/
|
*/
|
||||||
public CkanMetadataManagementPanel(HandlerManager eventBus){
|
public CkanMetadataManagementPanel(HandlerManager eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
// this.getElement().getStyle().setPaddingTop(H_OFFSET, Unit.PX);
|
// this.getElement().getStyle().setPaddingTop(H_OFFSET, Unit.PX);
|
||||||
// this.getElement().getStyle().setPaddingBottom(H_OFFSET, Unit.PX);
|
// this.getElement().getStyle().setPaddingBottom(H_OFFSET, Unit.PX);
|
||||||
|
|
||||||
// set link style buttons
|
// set link style buttons
|
||||||
home.setType(ButtonType.LINK);
|
home.setType(ButtonType.LINK);
|
||||||
|
@ -101,8 +105,11 @@ 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);
|
||||||
|
|
||||||
|
manageCMS.setType(ButtonType.PRIMARY);
|
||||||
|
manageCMS.getElement().getStyle().setFloat(Float.RIGHT);
|
||||||
|
|
||||||
// set icons
|
// set icons
|
||||||
home.setIcon(IconType.HOME);
|
home.setIcon(IconType.HOME);
|
||||||
|
@ -118,19 +125,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);
|
||||||
|
manageCMS.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);
|
||||||
|
manageCMS.setVisible(false);
|
||||||
|
manageCMS.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
|
||||||
|
manageCMS.setTitle(MANAGE_CMS_ITEMS_TOOLTIP);
|
||||||
|
manageCMS.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
|
|
||||||
// add to navigation bar
|
// add to navigation bar
|
||||||
nav.add(home);
|
nav.add(home);
|
||||||
|
@ -152,7 +166,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(manageCMS);
|
||||||
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);
|
||||||
|
@ -254,7 +269,6 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
myGroups.addClickHandler(new ClickHandler() {
|
myGroups.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -275,12 +289,23 @@ 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) {
|
||||||
|
|
||||||
eventBus.fireEvent(new ShowManageProductWidgetEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
|
eventBus.fireEvent(new ShowManageProductWidgetEvent(
|
||||||
|
GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
manageCMS.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
|
eventBus.fireEvent(new ClickedCMSManageProductButtonEvent());
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -294,13 +319,14 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
uploadToZenodo.addClickHandler(new ClickHandler() {
|
uploadToZenodo.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
eventBus.fireEvent(new PublishOnZenodoEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
|
eventBus.fireEvent(
|
||||||
|
new PublishOnZenodoEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -310,30 +336,31 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
*
|
*
|
||||||
* @return the current height
|
* @return the current height
|
||||||
*/
|
*/
|
||||||
public int getCurrentHeight(){
|
public int getCurrentHeight() {
|
||||||
return this.getOffsetHeight();
|
return this.getOffsetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Those buttons can be only visible when the logged user has role edit/admin/sysadmin.
|
* Those buttons can be only visible when the logged user has role
|
||||||
|
* edit/admin/sysadmin.
|
||||||
*
|
*
|
||||||
* @param show the show
|
* @param show the show
|
||||||
*/
|
*/
|
||||||
public void showInsertAndEditProductButtons(boolean show){
|
public void showInsertAndEditProductButtons(boolean show) {
|
||||||
|
|
||||||
//editMeta.setVisible(show); TODO
|
// editMeta.setVisible(show); TODO
|
||||||
//separatorAdminButtons.setVisible(show);
|
// separatorAdminButtons.setVisible(show);
|
||||||
insertMeta.setVisible(show);
|
insertMeta.setVisible(show);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 +368,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 CMS products..
|
||||||
|
*
|
||||||
|
* @param value true or false
|
||||||
|
*/
|
||||||
|
public void showManageCMSProductsButton(boolean value) {
|
||||||
|
manageCMS.setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable manage CMS products button.
|
||||||
|
*
|
||||||
|
* @param value the value
|
||||||
|
*/
|
||||||
|
public void enableManageCMSProductsButton(boolean value) {
|
||||||
|
manageCMS.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -350,7 +395,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
*
|
*
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
public void enableShareItemButton(boolean value){
|
public void enableShareItemButton(boolean value) {
|
||||||
shareLink.setEnabled(value);
|
shareLink.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,15 +404,14 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
*
|
*
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
public void enablePublishOnZenodoButton(boolean value){
|
public void enablePublishOnZenodoButton(boolean value) {
|
||||||
uploadToZenodo.setEnabled(value);
|
uploadToZenodo.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show only home/statistics buttons.
|
* Show only home/statistics buttons.
|
||||||
*/
|
*/
|
||||||
public void doNotShowUserRelatedInfo(){
|
public void doNotShowUserRelatedInfo() {
|
||||||
|
|
||||||
separatorMyInfo.setVisible(false);
|
separatorMyInfo.setVisible(false);
|
||||||
separatorAdminButtons.setVisible(false);
|
separatorAdminButtons.setVisible(false);
|
||||||
|
@ -378,7 +422,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);
|
||||||
|
manageCMS.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,67 +443,65 @@ 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);
|
||||||
|
manageCMS.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customize label according translate.
|
* Customize label according translate.
|
||||||
*
|
*
|
||||||
* @param labelName the label name
|
* @param labelName the label name
|
||||||
* @param translateValue the translate value
|
* @param translateValue the translate value
|
||||||
*/
|
*/
|
||||||
public void customizeLabelAccordingTranslate(String labelName, String translateValue){
|
public void customizeLabelAccordingTranslate(String labelName, String translateValue) {
|
||||||
|
|
||||||
|
if (labelName == null || labelName.isEmpty() || translateValue == null || translateValue.isEmpty())
|
||||||
if(labelName==null || labelName.isEmpty() || translateValue==null || translateValue.isEmpty())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// GWT.log("labelName "+labelName);
|
// GWT.log("labelName "+labelName);
|
||||||
// GWT.log("translateValue "+translateValue);
|
// GWT.log("translateValue "+translateValue);
|
||||||
// GWT.log("organizations "+organizations.getText());
|
// GWT.log("organizations "+organizations.getText());
|
||||||
|
|
||||||
if(labelName.compareToIgnoreCase(organizations.getText().trim())==0){
|
if (labelName.compareToIgnoreCase(organizations.getText().trim()) == 0) {
|
||||||
organizations.setText(translateValue);
|
organizations.setText(translateValue);
|
||||||
//return;
|
// return;
|
||||||
}else if(labelName.compareToIgnoreCase(groups.getText().trim())==0){
|
} else if (labelName.compareToIgnoreCase(groups.getText().trim()) == 0) {
|
||||||
groups.setText(translateValue);
|
groups.setText(translateValue);
|
||||||
//return;
|
// return;
|
||||||
}else if(labelName.compareToIgnoreCase(items.getText().trim())==0){
|
} else if (labelName.compareToIgnoreCase(items.getText().trim()) == 0) {
|
||||||
items.setText(translateValue);
|
items.setText(translateValue);
|
||||||
//return;
|
// return;
|
||||||
}else if(labelName.compareToIgnoreCase(types.getText().trim())==0){
|
} else if (labelName.compareToIgnoreCase(types.getText().trim()) == 0) {
|
||||||
types.setText(translateValue);
|
types.setText(translateValue);
|
||||||
//return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String mylabelName = MY_PREFIX+labelName;
|
String mylabelName = MY_PREFIX + labelName;
|
||||||
// GWT.log("mylabelName "+mylabelName);
|
// GWT.log("mylabelName "+mylabelName);
|
||||||
// GWT.log("myDatasets.getText() "+myDatasets.getText());
|
// GWT.log("myDatasets.getText() "+myDatasets.getText());
|
||||||
|
|
||||||
if(mylabelName.compareToIgnoreCase(myDatasets.getText().trim())==0){
|
if (mylabelName.compareToIgnoreCase(myDatasets.getText().trim()) == 0) {
|
||||||
myDatasets.setText(MY_PREFIX+translateValue);
|
myDatasets.setText(MY_PREFIX + translateValue);
|
||||||
//return;
|
// return;
|
||||||
}else if(mylabelName.compareToIgnoreCase(myOrganizations.getText().trim())==0){
|
} else if (mylabelName.compareToIgnoreCase(myOrganizations.getText().trim()) == 0) {
|
||||||
myOrganizations.setText(MY_PREFIX+translateValue);
|
myOrganizations.setText(MY_PREFIX + translateValue);
|
||||||
//return;
|
// return;
|
||||||
}else if(mylabelName.compareToIgnoreCase(myGroups.getText().trim())==0){
|
} else if (mylabelName.compareToIgnoreCase(myGroups.getText().trim()) == 0) {
|
||||||
myGroups.setText(MY_PREFIX+translateValue);
|
myGroups.setText(MY_PREFIX + translateValue);
|
||||||
//return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capitalize.
|
* Capitalize.
|
||||||
*
|
*
|
||||||
* @param stringValue the translate value
|
* @param stringValue the translate value
|
||||||
* @return the string
|
* @return the string
|
||||||
*/
|
*/
|
||||||
public static String capitalize(String stringValue){
|
public static String capitalize(String stringValue) {
|
||||||
return stringValue.substring(0,1).toUpperCase()+stringValue.substring(1, stringValue.length());
|
return stringValue.substring(0, 1).toUpperCase() + stringValue.substring(1, stringValue.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ 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 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;
|
||||||
|
@ -49,7 +50,7 @@ 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 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;
|
||||||
|
@ -58,18 +59,15 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
/**
|
/**
|
||||||
* 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";
|
||||||
|
@ -86,7 +84,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
// 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>(2);
|
||||||
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++) {
|
||||||
|
@ -96,19 +94,18 @@ 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 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
|
||||||
|
@ -123,36 +120,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>() {
|
||||||
|
@ -183,37 +181,39 @@ 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()));
|
||||||
|
|
||||||
|
@ -222,21 +222,29 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
/**
|
/**
|
||||||
* Just check if it is enabled.. then we need to listen for dom events coming
|
* 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 result) {
|
||||||
isManageProductToShow = result;
|
manageProductResponse = result;
|
||||||
managementPanel.showManageProductButton(isManageProductToShow);
|
if (manageProductResponse != null) {
|
||||||
|
|
||||||
|
if(manageProductResponse.isGRSFManageEnabled()) {
|
||||||
|
managementPanel.showManageCMSProductsButton(
|
||||||
|
manageProductResponse.isManageEnabled());
|
||||||
|
}else if(manageProductResponse.isManageEnabled()) {
|
||||||
|
managementPanel.showManageCMSProductsButton(manageProductResponse.isManageEnabled());
|
||||||
|
managementPanel.enableManageCMSProductsButton(manageProductResponse.isManageEnabled());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
@Override
|
managementPanel.showManageGRSFProductButton(false);
|
||||||
public void onFailure(Throwable caught) {
|
}
|
||||||
isManageProductToShow = false;
|
});
|
||||||
managementPanel.showManageProductButton(isManageProductToShow);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,14 +258,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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -270,28 +276,27 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
listenForPostMessage();
|
listenForPostMessage();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,8 +315,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) {
|
||||||
|
|
||||||
|
@ -322,8 +326,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) {
|
||||||
|
|
||||||
|
@ -333,8 +336,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) {
|
||||||
|
@ -366,16 +368,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();
|
||||||
|
@ -383,14 +384,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) /*-{
|
||||||
|
@ -401,71 +405,76 @@ 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.isGRSFManageEnabled());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// The data hasn't been sent from your site!
|
// The data hasn't been sent from your site!
|
||||||
|
@ -475,30 +484,29 @@ 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{
|
} else {
|
||||||
try{
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -515,9 +523,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();
|
||||||
|
@ -565,11 +574,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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.gcube.common.authorization.library.provider.UserInfo;
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.common.scope.impl.ScopeBean;
|
import org.gcube.common.scope.impl.ScopeBean;
|
||||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||||
|
import org.gcube.datacatalogue.grsf_manage_widget.shared.ManageProductBean;
|
||||||
import org.gcube.datacatalogue.utillibrary.server.DataCatalogue;
|
import org.gcube.datacatalogue.utillibrary.server.DataCatalogue;
|
||||||
import org.gcube.datacatalogue.utillibrary.server.DataCatalogueFactory;
|
import org.gcube.datacatalogue.utillibrary.server.DataCatalogueFactory;
|
||||||
import org.gcube.datacatalogue.utillibrary.server.utils.CatalogueUtilMethods;
|
import org.gcube.datacatalogue.utillibrary.server.utils.CatalogueUtilMethods;
|
||||||
|
@ -28,6 +29,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;
|
||||||
|
@ -506,22 +508,24 @@ 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 toReturn = catalogue.isManageProductEnabled();
|
||||||
logger.info("Will manage product be enabled for this user? " + Boolean.toString(toReturn));
|
logger.info("isManageProductEnabled: "+toReturn);
|
||||||
return 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
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
|
||||||
|
*
|
||||||
|
* Jun 15, 2021
|
||||||
|
*/
|
||||||
|
public class ManageProductResponse implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private boolean isManageEnabled;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGRSFScope() {
|
||||||
|
if (this.scope != null) {
|
||||||
|
if (this.scope.toLowerCase().contains("grsf")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGRSFManageEnabled() {
|
||||||
|
|
||||||
|
if (isGRSFScope() && isManageEnabled)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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' />
|
||||||
|
|
|
@ -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>greetServlet</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.widgets.ckancontentmoderator.server.CkanContentModeratorServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>greetServlet</servlet-name>
|
||||||
|
<url-pattern>/gCubeCkanDataCatalog/greet</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