Compare commits

..

No commits in common. "master" and "r5.11.2" have entirely different histories.

27 changed files with 361 additions and 1729 deletions

View File

@ -1,11 +1,16 @@
<?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.3.3/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.2.1-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.2.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<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"/>
@ -30,10 +35,5 @@
<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.3.3/WEB-INF/classes" path="src/main/resources"> <classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.2.1-SNAPSHOT/WEB-INF/classes"/>
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.3.3/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,5 +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.3.3 lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.2.1-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -1,11 +1,11 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.7

View File

@ -14,187 +14,7 @@
<wb-module deploy-name="gcube-ckan-datacatalog-2.2.1-SNAPSHOT">
<wb-module deploy-name="gcube-ckan-datacatalog-2.3.3">
@ -226,96 +46,6 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -332,96 +62,6 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -435,24 +75,6 @@
@ -472,96 +94,6 @@
<property name="context-root" value="gcube-ckan-datacatalog"/> <property name="context-root" value="gcube-ckan-datacatalog"/>
@ -578,96 +110,6 @@
<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"/>
@ -684,96 +126,6 @@
</wb-module> </wb-module>
@ -790,94 +142,4 @@
</project-modules> </project-modules>

View File

@ -6,5 +6,5 @@
<installed facet="liferay.portlet" version="6.0"/> <installed facet="liferay.portlet" version="6.0"/>
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/> <installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
<installed facet="jst.jaxrs" version="2.0"/> <installed facet="jst.jaxrs" version="2.0"/>
<installed facet="java" version="1.8"/> <installed facet="java" version="1.7"/>
</faceted-project> </faceted-project>

View File

@ -4,72 +4,6 @@
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.3.4] - 2024-10-15
- Moved to maven-portal-bom 4.0.0{-SNAPSHOT} [#28026]
## [v2.3.3] - 2024-10-01
- Patched `Time_Interval` type via widget [#28111]
## [v2.3.2] - 2024-07-03
- Includes the `metadata-profile-form-builder-widget` enhancement [#27488]
## [v2.3.1] - 2024-05-14
- Includes `ckan-metadata-publisher-widget` with bug fix [#27455] and new feature [#27467]
## [v2.3.0] - 2024-02-02
- Supported the Edit facility [#26639]
- Supported the Delete facility [#26793]
- Revisited the Navigation Bar
- Revisited the "Select Item Resources" step when publishing from Workspace [#26874]
- Catalogue at root VO or VO level works in read only mode [#26854]
## [v2.2.7] - 2023-12-21
- Including "Upload to Zenodo" fix [#26166]
## [v2.2.6] - 2023-07-25
- Just rebuilt the Portlet, fixing issue [#25275]
- Moved to GWT 2.10.0
## [v2.2.5] - 2023-03-02
#### Enhancements
- [#23903] Catalogue Moderation: allow to send a message to the moderators
- [#24309] Inform the VRE users that the catalogue is controlled/moderated
## [v2.2.4] - 2022-10-27
#### Enhancements
- [#24038] Moved to GWT 2.9
- [#23811] Just to release the grsf-manage-widget
## [v2.2.3] - 2022-08-01
#### Enhancements
- Just to release the optimization implemented for the Moderation Panel [#23692]
## [v2.2.2] - 2022-06-27
#### Enhancements
- Just to release the Publishing Widget enhancement [#23491]
- [#23525] Removed the scope of xml-apis dependency
- Moved to maven-portal-bom v3.6.4
#### Bug fixes
- Just to release the GRSF Manage Widget bug fixes [#23549], [#23561]
## [v2.2.1] - 2022-05-26 ## [v2.2.1] - 2022-05-26
#### Enhancements #### Enhancements

View File

@ -1,51 +1,16 @@
# gCube D4Science Data Catalog # gCube D4Science Data Catalog
The "gCube Data Catalogue" or "Catalogue" is a system that provides facilities for: a) (meta)data publishing and management based on roles; b) vres' products publishing; c) making data products publicly available; d) enriching products of metadata to maximise their potential reuse and making them searchable (via title, tags etc) are based on the CKAN technology. The Catalogue application allows to show all the metadata available in the CKAN instance, as well as publish a new product, retrieve the list of organizations (i.e. Virtual Research Environments) to which the user belongs and his/her already published products. Moreover, the "Catalogue" application (via configuration) provides moderation of its content enabling the user/s with the Moderator role to approve/reject the products under review. The gCube Data Catalog Portlet powered by CKAN
## Built With ## Built With
* [OpenJDK](https://openjdk.java.net/) - The JDK used * [OpenJDK](https://openjdk.java.net/) - The JDK used
* [Maven](https://maven.apache.org/) - Dependency Management * [Maven](https://maven.apache.org/) - Dependency Management
**Uses**
* GWT v.2.9.0. [GWT](http://www.gwtproject.org) is licensed under [Apache License 2.0](http://www.gwtproject.org/terms.html)
* GWT-Bootstrap v.2.3.2.0. [GWT-Bootstrap](https://github.com/gwtbootstrap) is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* CKAN v.2.6.x. [CKAN](https://ckan.org/) is licensed under [Creative Commons Attribution ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
**Related Components**
* [Catalogue Sharing Widget](https://code-repo.d4science.org/gCubeSystem/catalogue-sharing-widget)
* [Catalogue Content Moderator Widget](https://code-repo.d4science.org/gCubeSystem/ckan-content-moderator-widget)
* [GRSF Manage Widget](https://code-repo.d4science.org/gCubeSystem/grsf-manage-widget)
* [Catalogue Metadata Publisher Widget](https://code-repo.d4science.org/gCubeSystem/ckan-metadata-publisher-widget)
* [Ckan2Zenodo Publisher Widget](https://code-repo.d4science.org/gCubeSystem/ckan2zenodo-publisher-widget)
and others. You can discovery all dependencies via dependency hierarchy (e.g. use [dependency:tree](https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html))
## Showcase
**SoBigData Catalogue**
see at [SoBigData Catalogue](https://sobigdata.d4science.org/catalogue-sobigdata)
<img src="https://gcube.wiki.gcube-system.org/images_gcube/0/0e/Catalogue-SBG-Gateway.png" style="max-width:800px;" alt="SoBigData Catalogue" />
<br />
<br />
**Ecosystem Approach to Fisheries Catalogue**
see at [Ecosystem Approach to Fisheries Catalogue](https://i-marine.d4science.org/catalogue-imarine)
<img src="https://gcube.wiki.gcube-system.org/images_gcube/3/30/Catalogue-I-Marine-Gateway.png" style="max-width:800px;" alt="Ecosystem Approach to Fisheries Catalogue" />
## Documentation ## Documentation
You can find the D4Science Catalogue documentation at [GCat Background Wiki Page](https://wiki.gcube-system.org/GCat_Background) You can find the D4Science Catalogue documentation at [GCat Background Wiki Page](https://wiki.gcube-system.org/GCat_Background)
Technical note (ITA) [D4Science_Catalogue_Service](https://gcube.wiki.gcube-system.org/images_gcube/4/4f/D4Science_Catalogue_Service.pdf)
## Change log ## Change log
See the [Releases](https://code-repo.d4science.org/gCubeSystem/gcube-ckan-datacatalog/releases) See the [Releases](https://code-repo.d4science.org/gCubeSystem/gcube-ckan-datacatalog/releases)

80
pom.xml
View File

@ -7,27 +7,26 @@
<parent> <parent>
<artifactId>maven-parent</artifactId> <artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId> <groupId>org.gcube.tools</groupId>
<version>1.2.0</version> <version>1.1.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<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.3.4</version> <version>2.2.1</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>
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.10.0</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
<!-- GWT needs at least java 1.6 --> <!-- GWT needs at least java 1.6 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<gcube-portal-bom-version>3.7.0</gcube-portal-bom-version>
</properties> </properties>
<scm> <scm>
@ -36,39 +35,12 @@
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url> <url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
</scm> </scm>
<profiles>
<!-- PROD profile -->
<profile>
<id>catalogue-release-profile</id>
<activation>
<property>
<name>Release</name>
</property>
</activation>
<properties>
<maven-portal-bom-version>4.0.0</maven-portal-bom-version>
</properties>
</profile>
<!-- DEV profile -->
<profile>
<id>catalogue-snapshot-profile</id>
<activation>
<property>
<name>!Release</name>
</property>
</activation>
<properties>
<maven-portal-bom-version>4.0.0-SNAPSHOT</maven-portal-bom-version>
</properties>
</profile>
</profiles>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>${maven-portal-bom-version}</version> <version>3.6.3</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
<exclusions> <exclusions>
@ -83,33 +55,41 @@
</exclusions> </exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<!-- <dependency> -->
<!-- <groupId>xerces</groupId> -->
<!-- <artifactId>xercesImpl</artifactId> -->
<!-- <version>2.9.1</version> -->
<!-- </dependency> -->
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>xml-apis</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>xml-apis</artifactId>
<version>3.1.0</version> <version>1.4.01</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId> <artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version> <version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId> <artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version> <version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>com.github.gwtbootstrap</groupId> <groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId> <artifactId>gwt-bootstrap</artifactId>
@ -152,16 +132,10 @@
<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>metadata-profile-form-builder-widget</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>ckan-metadata-publisher-widget</artifactId> <artifactId>ckan-metadata-publisher-widget</artifactId>
<version>[2.1.0,3.0.0)</version> <version>[2.0.0-SNAPSHOT,3.0.0)</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -233,14 +207,6 @@
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
</dependency> </dependency>
<!-- REQUIRED FOR JDK_11 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
<scope>provided</scope>
</dependency>
<!-- LOGGER --> <!-- LOGGER -->
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>

View File

@ -20,10 +20,6 @@
<inherits <inherits
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' /> name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
<inherits
name='org.gcube.portlets.widgets.mpformbuilder.MetadataProfileFormBuilder' />
<inherits <inherits
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' /> name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
<inherits <inherits
@ -33,9 +29,6 @@
<inherits <inherits
name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits
name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
<inherits <inherits
name='org.gcube.portlets.widgets.switchbutton.SwitchButton' /> name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
<inherits <inherits
@ -43,6 +36,7 @@
<inherits <inherits
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' /> name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point <entry-point
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' /> class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />

View File

@ -7,8 +7,6 @@ import org.gcube.datacatalogue.grsf_manage_widget.client.view.ManageProductWidge
import org.gcube.datacatalogue.utillibrary.shared.ItemStatus; import org.gcube.datacatalogue.utillibrary.shared.ItemStatus;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ClickedCMSManageProductButtonEvent; 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.ClickedCMSManageProductButtonEventHandler;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.DeleteItemEvent;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.DeleteItemEventHandler;
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;
@ -41,11 +39,7 @@ import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModerat
import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorWidgetTrusted; import org.gcube.portlets.widgets.ckancontentmoderator.client.CkanContentModeratorWidgetTrusted;
import org.gcube.portlets.widgets.ckancontentmoderator.client.ContentModeratorWidgetConstants; import org.gcube.portlets.widgets.ckancontentmoderator.client.ContentModeratorWidgetConstants;
import org.gcube.portlets.widgets.ckancontentmoderator.shared.DISPLAY_FIELD; import org.gcube.portlets.widgets.ckancontentmoderator.shared.DISPLAY_FIELD;
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.ReloadDatasetPageEvent;
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.ReloadDatasetPageEventHandler;
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.action.DeleteItemPanel;
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.ckandatapublisherwidget.client.ui.form.UpdateDatasetForm;
import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget; import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget;
import com.github.gwtbootstrap.client.ui.Modal; import com.github.gwtbootstrap.client.ui.Modal;
@ -101,7 +95,6 @@ public class CkanEventHandlerManager {
} }
}); });
// bind on insert metadata // bind on insert metadata
eventBus.addHandler(InsertMetadataEvent.TYPE, new InsertMetadataEventHandler() { eventBus.addHandler(InsertMetadataEvent.TYPE, new InsertMetadataEventHandler() {
@ -124,7 +117,7 @@ public class CkanEventHandlerManager {
// public void onHide(HideEvent hideEvent) { // public void onHide(HideEvent hideEvent) {
// GWT.log("HideEvent on modal fired"); // GWT.log("HideEvent on modal fired");
// GWT.log(hideEvent.toDebugString()); // GWT.log(hideEvent.toDebugString());
// eventBus.fireEvent(new CloseCreationFormProfileEvent()); // eventBus.fireEvent(new CloseCreationFormEvent());
// //
// hideEvent.preventDefault(); // hideEvent.preventDefault();
// hideEvent.stopPropagation(); // hideEvent.stopPropagation();
@ -137,6 +130,15 @@ public class CkanEventHandlerManager {
modal.show(); modal.show();
} }
}); });
// bind on edit (TODO)
eventBus.addHandler(EditMetadataEvent.TYPE, new EditMetadataEventHandler() {
@Override
public void onEditMetadata(EditMetadataEvent editMetadataEvent) {
// TODO Auto-generated method stub
}
});
// show datasets event // show datasets event
eventBus.addHandler(ShowDatasetsEvent.TYPE, new ShowDatasetsEventHandler() { eventBus.addHandler(ShowDatasetsEvent.TYPE, new ShowDatasetsEventHandler() {
@ -144,37 +146,14 @@ public class CkanEventHandlerManager {
@Override @Override
public void onShowDatasets(ShowDatasetsEvent showUserDatasetsEvent) { public void onShowDatasets(ShowDatasetsEvent showUserDatasetsEvent) {
String request = null; String request = null;
if (showUserDatasetsEvent.isOwnOnly())
if (showUserDatasetsEvent.getDatasetId() == null) {
if (showUserDatasetsEvent.isOwnOnly()) {
request = getCkanRequest("/dashboard/datasets", null); request = getCkanRequest("/dashboard/datasets", null);
} else { else
request = getCkanRequest("/dataset", null); request = getCkanRequest("/dataset", null);
}
} else {
String datasetId = showUserDatasetsEvent.getDatasetId();
request = getCkanRequest("/dataset/" + datasetId, null);
}
gcubeCkanDataCatalogue.instanceCkanFrame(request); gcubeCkanDataCatalogue.instanceCkanFrame(request);
} }
}); });
// ReloadDatasetPageEvent is declared in the Publisher Widget
eventBus.addHandler(ReloadDatasetPageEvent.TYPE, new ReloadDatasetPageEventHandler() {
@Override
public void onReloadDatasetPage(ReloadDatasetPageEvent addResourceEvent) {
if (addResourceEvent.getDatasetIDorName() != null) {
eventBus.fireEvent(new ShowDatasetsEvent(false, addResourceEvent.getDatasetIDorName()));
} else {
eventBus.fireEvent(new ShowDatasetsEvent(false));
}
}
});
eventBus.addHandler(ShowTypesEvent.TYPE, new ShowTypesEventHandler() { eventBus.addHandler(ShowTypesEvent.TYPE, new ShowTypesEventHandler() {
@Override @Override
@ -222,6 +201,29 @@ public class CkanEventHandlerManager {
} }
}); });
// eventBus.addHandler(NotifyLogoutEvent.TYPE, new NotifyLogoutEventHandler() {
//
// @Override
// public void onLogout(NotifyLogoutEvent editMetadataEvent) {
//
// // CKanLeaveFrame frame = new
// CKanLeaveFrame(GCubeCkanDataCatalog.CKAN_LOGUT_SERVICE);
// // DOM.appendChild(RootPanel.getBodyElement(), frame.getElement());
// }
// });
//
// eventBus.addHandler(IFrameInstanciedEvent.TYPE, new
// IFrameInstanciedEventHandler() {
//
// @Override
// public void onNewInstance(IFrameInstanciedEvent iFrameInstanciedEvent) {
//
// gcubeCkanDataCatalogue.updateSize();
// if(logoutFromCKANURL==null)
// instanceLogoutSystem();
// }
// });
eventBus.addHandler(ShowManageProductWidgetEvent.TYPE, new ShowManageProductWidgetEventHandler() { eventBus.addHandler(ShowManageProductWidgetEvent.TYPE, new ShowManageProductWidgetEventHandler() {
@Override @Override
@ -303,55 +305,6 @@ public class CkanEventHandlerManager {
} }
}); });
eventBus.addHandler(EditMetadataEvent.TYPE, new EditMetadataEventHandler() {
@Override
public void onEditMetadata(EditMetadataEvent editMetadataEvent) {
GWT.log("editMetadataEvent: " + editMetadataEvent);
if (editMetadataEvent.getItemID() != null) {
final Modal modal = new ExtModal(true, true);
modal.setTitle("Update Item");
modal.addStyleName("insert-metadata-modal-style");
modal.addStyleName("modal-top-custom");
((Element) modal.getElement().getChildNodes().getItem(1)).addClassName("modal-body-custom");
modal.add(new UpdateDatasetForm(eventBus, editMetadataEvent.getItemID()));
modal.setCloseVisible(true);
GWT.log("show");
modal.show();
}
}
});
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
@Override
public void onDeleteItem(DeleteItemEvent deleteItemEvent) {
GWT.log("deleteItemEvent: " + deleteItemEvent);
if (deleteItemEvent.getItemID() != null) {
GWT.log("deleteItemEvent: " + deleteItemEvent);
final Modal modal = new ExtModal(true, true);
modal.setTitle("Delete Item");
modal.addStyleName("modal-top-custom");
((Element) modal.getElement().getChildNodes().getItem(1)).addClassName("modal-body-custom");
modal.add(new DeleteItemPanel(eventBus, deleteItemEvent.getItemID()));
modal.setCloseVisible(true);
GWT.log("show");
modal.show();
}
}
});
} }
/** /**

View File

@ -27,8 +27,6 @@ public class GCubeCkanDataCatalog implements EntryPoint {
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";
//public static final String LOGGED_IN_DIV = "logged_in";
/** /**
* This is the entry point method. * This is the entry point method.
*/ */
@ -39,7 +37,4 @@ public class GCubeCkanDataCatalog implements EntryPoint {
eventManager.setPanel(panel); eventManager.setPanel(panel);
} }
} }

View File

@ -1,66 +0,0 @@
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class DeleteItemEvent.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Feb 19, 2024
*/
public class DeleteItemEvent extends GwtEvent<DeleteItemEventHandler> {
public static Type<DeleteItemEventHandler> TYPE = new Type<DeleteItemEventHandler>();
private String itemID;
/**
* Instantiates a new delete item event.
*
* @param itemID the item ID
*/
public DeleteItemEvent(String itemID) {
this.itemID = itemID;
}
/**
* Gets the associated type.
*
* @return the associated type
*/
/*
* (non-Javadoc)
*
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/
@Override
public Type<DeleteItemEventHandler> getAssociatedType() {
return TYPE;
}
/**
* Dispatch.
*
* @param handler the handler
*/
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.
* EventHandler)
*/
@Override
protected void dispatch(DeleteItemEventHandler handler) {
handler.onDeleteItem(this);
}
/**
* Gets the item ID.
*
* @return the item ID
*/
public String getItemID() {
return itemID;
}
}

View File

@ -1,21 +0,0 @@
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* The Interface DeleteItemEventHandler.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Feb 19, 2024
*/
public interface DeleteItemEventHandler extends EventHandler {
/**
* On delete item.
*
* @param deleteItemEvent the delete item event
*/
void onDeleteItem(DeleteItemEvent deleteItemEvent);
}

View File

@ -11,22 +11,14 @@ import com.google.gwt.event.shared.GwtEvent;
*/ */
public class EditMetadataEvent extends GwtEvent<EditMetadataEventHandler> { public class EditMetadataEvent extends GwtEvent<EditMetadataEventHandler> {
public static Type<EditMetadataEventHandler> TYPE = new Type<EditMetadataEventHandler>(); public static Type<EditMetadataEventHandler> TYPE = new Type<EditMetadataEventHandler>();
private String itemID;
/** /**
* Instantiates a new edits the metadata event. * Instantiates a new insert metadata event.
*
* @param itemID the item ID
*/ */
public EditMetadataEvent(String itemID) { public EditMetadataEvent() {
this.itemID = itemID;
} }
/**
* Gets the associated type.
*
* @return the associated type
*/
/* (non-Javadoc) /* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType() * @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/ */
@ -35,11 +27,6 @@ public class EditMetadataEvent extends GwtEvent<EditMetadataEventHandler> {
return TYPE; return TYPE;
} }
/**
* Dispatch.
*
* @param handler the handler
*/
/* (non-Javadoc) /* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler) * @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
*/ */
@ -48,8 +35,4 @@ public class EditMetadataEvent extends GwtEvent<EditMetadataEventHandler> {
handler.onEditMetadata(this); handler.onEditMetadata(this);
} }
public String getItemID() {
return itemID;
}
} }

View File

@ -2,28 +2,25 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.GwtEvent;
/** /**
* The Class IFrameInstanciedEvent. * The Class NotifyLogoutEvent.
* *
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jun 23, 2016 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jun 23, 2016
*/ */
public class IFrameInstanciedEvent extends GwtEvent<IFrameInstanciedEventHandler> { public class IFrameInstanciedEvent extends GwtEvent<IFrameInstanciedEventHandler> {
public static Type<IFrameInstanciedEventHandler> TYPE = new Type<IFrameInstanciedEventHandler>(); public static Type<IFrameInstanciedEventHandler> TYPE = new Type<IFrameInstanciedEventHandler>();
/** /**
* Instantiates a new insert metadata event. * Instantiates a new insert metadata event.
*/ */
public IFrameInstanciedEvent() { public IFrameInstanciedEvent() {
} }
/** /* (non-Javadoc)
* Gets the associated type.
*
* @return the associated type
*/
/*
* (non-Javadoc)
*
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType() * @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/ */
@Override @Override
@ -31,17 +28,8 @@ public class IFrameInstanciedEvent extends GwtEvent<IFrameInstanciedEventHandler
return TYPE; return TYPE;
} }
/** /* (non-Javadoc)
* Dispatch. * @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
*
* @param handler the handler
*/
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.
* EventHandler)
*/ */
@Override @Override
protected void dispatch(IFrameInstanciedEventHandler handler) { protected void dispatch(IFrameInstanciedEventHandler handler) {

View File

@ -2,15 +2,17 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.EventHandler;
/** /**
* The Interface IFrameInstanciedEventHandler. * The Interface IFrameInstanciedEentHandler.
* *
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* * Jun 23, 2016
* Feb 13, 2024
*/ */
public interface IFrameInstanciedEventHandler extends EventHandler { public interface IFrameInstanciedEventHandler extends EventHandler {
/** /**
* On new instance. * On new instance.
* *

View File

@ -3,11 +3,8 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.GwtEvent;
/** /**
* The Class ShowDatasetsEvent. * Raised when the user wants to see his datasets.
* * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Feb 13, 2024
*/ */
public class ShowDatasetsEvent extends GwtEvent<ShowDatasetsEventHandler>{ public class ShowDatasetsEvent extends GwtEvent<ShowDatasetsEventHandler>{
@ -15,45 +12,20 @@ public class ShowDatasetsEvent extends GwtEvent<ShowDatasetsEventHandler> {
private boolean ownOnly; private boolean ownOnly;
private String datasetId;
/** /**
* Instantiates a new show user datasets event. * Instantiates a new show user datasets event.
*
* @param ownOnly the own only
*/ */
public ShowDatasetsEvent(boolean ownOnly) { public ShowDatasetsEvent(boolean ownOnly) {
this.ownOnly = ownOnly; this.ownOnly = ownOnly;
} }
/**
* Instantiates a new show user datasets event.
*
* @param ownOnly the own only
* @param datasetId the dataset id
*/
public ShowDatasetsEvent(boolean ownOnly, String datasetId) {
this.ownOnly = ownOnly;
this.datasetId = datasetId;
}
/**
* Checks if is own only.
*
* @return true, if is own only
*/
public boolean isOwnOnly() { public boolean isOwnOnly() {
return ownOnly; return ownOnly;
} }
/** /* (non-Javadoc)
* Gets the associated type.
*
* @return the associated type
*/
/*
* (non-Javadoc)
*
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType() * @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/ */
@Override @Override
@ -61,25 +33,12 @@ public class ShowDatasetsEvent extends GwtEvent<ShowDatasetsEventHandler> {
return TYPE; return TYPE;
} }
/** /* (non-Javadoc)
* Dispatch. * @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
*
* @param handler the handler
*/
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.
* EventHandler)
*/ */
@Override @Override
protected void dispatch(ShowDatasetsEventHandler handler) { protected void dispatch(ShowDatasetsEventHandler handler) {
handler.onShowDatasets(this); handler.onShowDatasets(this);
} }
public String getDatasetId() {
return datasetId;
}
} }

View File

@ -4,7 +4,6 @@
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.ClickedCMSManageProductButtonEvent;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.DeleteItemEvent;
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;
@ -17,14 +16,11 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowOrgani
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowStatisticsEvent; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowStatisticsEvent;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesEvent; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesEvent;
import com.github.gwtbootstrap.client.ui.AlertBlock;
import com.github.gwtbootstrap.client.ui.Button; import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.DropdownButton; import com.github.gwtbootstrap.client.ui.constants.AlertType;
import com.github.gwtbootstrap.client.ui.Label;
import com.github.gwtbootstrap.client.ui.NavLink;
import com.github.gwtbootstrap.client.ui.Navbar;
import com.github.gwtbootstrap.client.ui.constants.ButtonType; import com.github.gwtbootstrap.client.ui.constants.ButtonType;
import com.github.gwtbootstrap.client.ui.constants.IconType; import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Float; import com.google.gwt.dom.client.Style.Float;
import com.google.gwt.dom.client.Style.FontWeight; import com.google.gwt.dom.client.Style.FontWeight;
import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.Style.Unit;
@ -43,19 +39,18 @@ import com.google.gwt.user.client.ui.InlineHTML;
*/ */
public class CkanMetadataManagementPanel extends FlowPanel { public class CkanMetadataManagementPanel extends FlowPanel {
private static final String MESSAGE_MODERATED_CATALOGUE = "Moderation Enabled"; /**
*
public static final String CATALOGUE_ITEMS_WERE_APPROVED_BY_CATALOGUE_MODERATOR_S = "Catalogue items were approved by Catalogue Moderator(s)."; */
private static final String MY_PREFIX = "My "; private static final String MY_PREFIX = "My ";
private static final String MANAGE_GRSF_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." 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."; + "Manageable items are not APPROVED and NOT PUBLISHED in the Catalogue.";
private Navbar nav = new Navbar(); private AlertBlock nav = new AlertBlock();
// generic // generic
private Button home = new Button("Home"); private Button home = new Button("Home");
@ -65,14 +60,11 @@ public class CkanMetadataManagementPanel extends FlowPanel {
private Button types = new Button("Types"); private Button types = new Button("Types");
// user's own // user's own
private InlineHTML pipe_MyInfo_start = null; private InlineHTML separatorMyInfo = null;
private InlineHTML pipe_PublishItem_start = null; private InlineHTML separatorAdminButtons = null;
private InlineHTML pipe_SelectedItemOptions_start = null; private Button myDatasets = new Button("My Items");
private Button myOrganizations = new Button("My Organizations");
private DropdownButton dropMyOptionButtons = new DropdownButton("My..."); private Button myGroups = new Button("My Groups");
private NavLink myDatasets = new NavLink("My Items");
private NavLink myOrganizations = new NavLink("My Organizations");
private NavLink myGroups = new NavLink("My Groups");
// statistics // statistics
private Button statistics = new Button("Statistics"); private Button statistics = new Button("Statistics");
@ -81,13 +73,9 @@ public class CkanMetadataManagementPanel extends FlowPanel {
private Button shareLink = new Button("Share Link"); private Button shareLink = new Button("Share Link");
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("Update Item"); private Button editMeta = new Button("Edit Item");
private Button deleteItem = new Button("Delete Item");
private Button manageGRSFProduct = new Button("Manage GRSF Item"); //GRSF Manage private Button manageGRSFProduct = new Button("Manage GRSF Item"); //GRSF Manage
private Button manageCModS = new Button("Manage Items"); //Moderation private Button manageCModS = new Button("Manage Items"); //Moderation
private Label messageModerationEnanbled = new Label(); // Moderation message
private HandlerManager eventBus; private HandlerManager eventBus;
/** /**
@ -107,13 +95,16 @@ public class CkanMetadataManagementPanel extends FlowPanel {
items.setType(ButtonType.LINK); items.setType(ButtonType.LINK);
types.setType(ButtonType.LINK); types.setType(ButtonType.LINK);
myDatasets.setType(ButtonType.LINK);
myOrganizations.setType(ButtonType.LINK);
myGroups.setType(ButtonType.LINK);
statistics.setType(ButtonType.LINK); statistics.setType(ButtonType.LINK);
shareLink.setType(ButtonType.LINK); shareLink.setType(ButtonType.LINK);
uploadToZenodo.setType(ButtonType.LINK); uploadToZenodo.setType(ButtonType.LINK);
insertMeta.setType(ButtonType.LINK); insertMeta.setType(ButtonType.LINK);
editMeta.setType(ButtonType.LINK); editMeta.setType(ButtonType.LINK);
deleteItem.setType(ButtonType.LINK);
manageGRSFProduct.setType(ButtonType.PRIMARY); manageGRSFProduct.setType(ButtonType.PRIMARY);
manageGRSFProduct.getElement().getStyle().setFloat(Float.RIGHT); manageGRSFProduct.getElement().getStyle().setFloat(Float.RIGHT);
@ -121,10 +112,6 @@ public class CkanMetadataManagementPanel extends FlowPanel {
manageCModS.getElement().getStyle().setFloat(Float.RIGHT); manageCModS.getElement().getStyle().setFloat(Float.RIGHT);
manageCModS.getElement().getStyle().setMarginRight(20, Unit.PX); manageCModS.getElement().getStyle().setMarginRight(20, Unit.PX);
messageModerationEnanbled.setTitle(MESSAGE_MODERATED_CATALOGUE);
messageModerationEnanbled.getElement().setInnerHTML("<i class='icon-user'></i> " + MESSAGE_MODERATED_CATALOGUE);
messageModerationEnanbled.addStyleName("moderation-enabled-flag");
// set icons // set icons
home.setIcon(IconType.HOME); home.setIcon(IconType.HOME);
organizations.setIcon(IconType.BUILDING); organizations.setIcon(IconType.BUILDING);
@ -138,29 +125,19 @@ public class CkanMetadataManagementPanel extends FlowPanel {
myGroups.setIcon(IconType.GROUP); myGroups.setIcon(IconType.GROUP);
insertMeta.setIcon(IconType.FILE); insertMeta.setIcon(IconType.FILE);
editMeta.setIcon(IconType.EDIT_SIGN); editMeta.setIcon(IconType.EDIT_SIGN);
deleteItem.setIcon(IconType.REMOVE_CIRCLE);
statistics.setIcon(IconType.BAR_CHART); statistics.setIcon(IconType.BAR_CHART);
manageGRSFProduct.setIcon(IconType.CHECK_SIGN); manageGRSFProduct.setIcon(IconType.CHECK_SIGN);
manageCModS.setIcon(IconType.CHECK_SIGN); manageCModS.setIcon(IconType.CHECK_SIGN);
// disabling share and upload // hide edit and insert
shareLink.setEnabled(false); shareLink.setEnabled(false);
uploadToZenodo.setEnabled(false); uploadToZenodo.setEnabled(false);
// hide upload to zenodo
uploadToZenodo.setVisible(false);
// hide publish/update/delete
editMeta.setVisible(false); editMeta.setVisible(false);
deleteItem.setVisible(false);
insertMeta.setVisible(false); insertMeta.setVisible(false);
// hide manage GRSF product and Moderation
manageGRSFProduct.setVisible(false); manageGRSFProduct.setVisible(false);
manageGRSFProduct.setEnabled(false); manageGRSFProduct.setEnabled(false);
manageCModS.setVisible(false); manageCModS.setVisible(false);
manageCModS.setEnabled(false); manageCModS.setEnabled(false);
messageModerationEnanbled.setVisible(false);
// manage GRSF item info // manage GRSF item info
manageGRSFProduct.setTitle(MANAGE_GRSF_ITEM_TOOLTIP); manageGRSFProduct.setTitle(MANAGE_GRSF_ITEM_TOOLTIP);
@ -170,10 +147,6 @@ public class CkanMetadataManagementPanel extends FlowPanel {
manageCModS.setTitle(MANAGE_CMS_ITEMS_TOOLTIP); manageCModS.setTitle(MANAGE_CMS_ITEMS_TOOLTIP);
manageCModS.getElement().getStyle().setFontWeight(FontWeight.BOLD); manageCModS.getElement().getStyle().setFontWeight(FontWeight.BOLD);
nav.add(messageModerationEnanbled);
nav.setId("the_catalogue_nav_bar");
nav.addStyleName("nav_bar_catalogue");
// add to navigation bar // add to navigation bar
nav.add(home); nav.add(home);
nav.add(organizations); nav.add(organizations);
@ -181,37 +154,25 @@ public class CkanMetadataManagementPanel extends FlowPanel {
nav.add(items); nav.add(items);
nav.add(types); nav.add(types);
nav.add(statistics); nav.add(statistics);
pipe_MyInfo_start = new InlineHTML( separatorMyInfo = new InlineHTML("<span style=\"font-weight:bold;vertical-alignment:middle;\">|</span>");
"<span style=\"font-weight:bold;vertical-alignment:middle;margin:0 5px;\">|</span>"); separatorMyInfo.setVisible(true);
pipe_MyInfo_start.setVisible(true); nav.add(separatorMyInfo);
nav.add(pipe_MyInfo_start); nav.add(myOrganizations);
nav.add(myGroups);
dropMyOptionButtons.setBaseIcon(IconType.USER); nav.add(myDatasets);
dropMyOptionButtons.add(myOrganizations); separatorAdminButtons = new InlineHTML("<span style=\"font-weight:bold;vertical-alignment:middle;\">|</span>");
dropMyOptionButtons.add(myGroups); separatorAdminButtons.setVisible(true);
dropMyOptionButtons.add(myDatasets); nav.add(separatorAdminButtons);
dropMyOptionButtons.setType(ButtonType.LINK);
nav.add(dropMyOptionButtons);
pipe_PublishItem_start = new InlineHTML(
"<span style=\"font-weight:bold;vertical-alignment:middle;margin:0 5px;\">|</span>");
pipe_PublishItem_start.setVisible(false);
nav.add(pipe_PublishItem_start);
nav.add(insertMeta);
pipe_SelectedItemOptions_start = new InlineHTML(
"<span style=\"font-weight:bold;vertical-alignment:middle;margin:0 5px;\">|</span>");
pipe_SelectedItemOptions_start.setVisible(true);
nav.add(pipe_SelectedItemOptions_start);
nav.add(editMeta);
nav.add(deleteItem);
nav.add(shareLink); nav.add(shareLink);
nav.add(uploadToZenodo); nav.add(uploadToZenodo);
nav.add(insertMeta);
nav.add(editMeta);
nav.add(manageGRSFProduct); nav.add(manageGRSFProduct);
nav.add(manageCModS); nav.add(manageCModS);
nav.setClose(false);
nav.setType(AlertType.INFO);
nav.getElement().getStyle().setMarginBottom(0, Unit.PX);
nav.getElement().getStyle().setBackgroundColor("#FFF");
addHandlers(); addHandlers();
add(nav); add(nav);
} }
@ -284,18 +245,8 @@ public class CkanMetadataManagementPanel extends FlowPanel {
@Override @Override
public void onClick(ClickEvent event) { public void onClick(ClickEvent event) {
GWT.log("Edit Meta clicked");
eventBus.fireEvent(
new EditMetadataEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
}
});
deleteItem.addClickHandler(new ClickHandler() { eventBus.fireEvent(new EditMetadataEvent());
@Override
public void onClick(ClickEvent event) {
GWT.log("Delete item clicked");
eventBus.fireEvent(new DeleteItemEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
} }
}); });
@ -391,12 +342,17 @@ public class CkanMetadataManagementPanel extends FlowPanel {
} }
/** /**
* Enable publish button. * Those buttons can be only visible when the logged user has role
* edit/admin/sysadmin.
* *
* @param enable the enable * @param show the show
*/ */
public void enablePublishItemButton(boolean enable) { public void showInsertAndEditProductButtons(boolean show) {
insertMeta.setEnabled(enable);
// editMeta.setVisible(show); TODO
// separatorAdminButtons.setVisible(show);
insertMeta.setVisible(show);
} }
/** /**
@ -418,8 +374,7 @@ public class CkanMetadataManagementPanel extends FlowPanel {
} }
/** /**
* Button to manage the products under moderation via Content Moderation System * Button to manage the products under moderation via Content Moderation System (CMS)
* (CMS).
* *
* @param value true or false * @param value true or false
*/ */
@ -427,16 +382,6 @@ public class CkanMetadataManagementPanel extends FlowPanel {
manageCModS.setVisible(value); manageCModS.setVisible(value);
} }
/**
* Show message catalogue is moderated.
*
* @param isContentModerationEnabled the is content moderation enabled
*/
public void showMessageCatalogueIsModerated(boolean isContentModerationEnabled) {
messageModerationEnanbled.setVisible(isContentModerationEnabled);
}
/** /**
* Enable manage CMS products button. * Enable manage CMS products button.
* *
@ -464,24 +409,6 @@ public class CkanMetadataManagementPanel extends FlowPanel {
uploadToZenodo.setEnabled(value); uploadToZenodo.setEnabled(value);
} }
/**
* Enable edit item button.
*
* @param value the value
*/
public void enableEditItemButton(boolean value) {
editMeta.setEnabled(value);
}
/**
* Enable delete item button.
*
* @param value the value
*/
public void enableDeleteItemButton(boolean value) {
deleteItem.setEnabled(value);
}
/** /**
* Visibility publish on zenodo button. * Visibility publish on zenodo button.
* *
@ -491,55 +418,20 @@ public class CkanMetadataManagementPanel extends FlowPanel {
uploadToZenodo.setVisible(value); uploadToZenodo.setVisible(value);
} }
/**
* Visibility publish item button.
*
* @param value the value
* @param alsoThePipe the also the pipe. If true set bool value also the related
* pipe 'pipe_PublishItem_start'
*/
public void visibilityPublishItemButton(boolean bool, boolean alsoThePipe) {
insertMeta.setVisible(bool);
if (alsoThePipe) {
pipe_PublishItem_start.setVisible(bool);
}
}
/**
* Visibility edit item button.
*
* @param value the value
*/
public void visibilityEditItemButton(boolean value) {
editMeta.setVisible(value);
}
/**
* Visibility delete item button.
*
* @param value the value
*/
public void visibilityDeleteItemButton(boolean value) {
deleteItem.setVisible(value);
}
/** /**
* Show only home/statistics buttons. * Show only home/statistics buttons.
*/ */
public void doNotShowUserRelatedInfo() { public void doNotShowUserRelatedInfo() {
pipe_MyInfo_start.setVisible(false); separatorMyInfo.setVisible(false);
pipe_PublishItem_start.setVisible(false); separatorAdminButtons.setVisible(false);
pipe_SelectedItemOptions_start.setVisible(false);
shareLink.setVisible(false); shareLink.setVisible(false);
uploadToZenodo.setVisible(false); uploadToZenodo.setVisible(false);
insertMeta.setVisible(false); insertMeta.setVisible(false);
editMeta.setVisible(false); editMeta.setVisible(false);
deleteItem.setVisible(false); myDatasets.setVisible(false);
dropMyOptionButtons.setVisible(false); myOrganizations.setVisible(false);
// myDatasets.setVisible(false); myGroups.setVisible(false);
// myOrganizations.setVisible(false);
// myGroups.setVisible(false);
manageGRSFProduct.setVisible(false); manageGRSFProduct.setVisible(false);
manageCModS.setVisible(false); manageCModS.setVisible(false);
@ -555,12 +447,11 @@ public class CkanMetadataManagementPanel extends FlowPanel {
groups.setVisible(false); groups.setVisible(false);
items.setVisible(false); items.setVisible(false);
types.setVisible(false); types.setVisible(false);
pipe_MyInfo_start.setVisible(false); separatorMyInfo.setVisible(false);
pipe_PublishItem_start.setVisible(false); separatorAdminButtons.setVisible(false);
dropMyOptionButtons.setVisible(false); myDatasets.setVisible(false);
// myDatasets.setVisible(false); myOrganizations.setVisible(false);
// myOrganizations.setVisible(false); myGroups.setVisible(false);
// myGroups.setVisible(false);
statistics.setVisible(false); statistics.setVisible(false);
manageGRSFProduct.setVisible(false); manageGRSFProduct.setVisible(false);
manageCModS.setVisible(false); manageCModS.setVisible(false);

View File

@ -181,60 +181,25 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
managementPanel.visibilityEditItemButton(false); showEditInsertButtons(false);
managementPanel.visibilityDeleteItemButton(false);
managementPanel.visibilityPublishItemButton(false, true);
} }
@Override @Override
public void onSuccess(RolesCkanGroupOrOrg result) { public void onSuccess(RolesCkanGroupOrOrg result) {
GWT.log("isUserLoggedInVRE: "+ckanAccessPoint.isUserLoggedInVRE());
GWT.log("getLoggedInScope: "+ckanAccessPoint.getLoggedInScope());
if (ckanAccessPoint.isUserLoggedInVRE()) {
switch (result) { switch (result) {
case ADMIN: { case ADMIN:
managementPanel.visibilityPublishItemButton(true, true); showEditInsertButtons(true);
managementPanel.visibilityEditItemButton(true);
managementPanel.visibilityDeleteItemButton(true);
managementPanel.enablePublishItemButton(true);
//RootPanel.get(GCubeCkanDataCatalog.LOGGED_IN_DIV).add(new HTML("Logged in as "+RolesCkanGroupOrOrg.ADMIN));
break; break;
} case EDITOR:
case EDITOR: { showEditInsertButtons(true);
managementPanel.visibilityPublishItemButton(true, true);
managementPanel.visibilityEditItemButton(true);
managementPanel.visibilityDeleteItemButton(true);
managementPanel.enablePublishItemButton(true);
//RootPanel.get(GCubeCkanDataCatalog.LOGGED_IN_DIV).add(new HTML("Logged in as "+RolesCkanGroupOrOrg.EDITOR));
break; break;
} case MEMBER:
case MEMBER: { showEditInsertButtons(false);
managementPanel.visibilityEditItemButton(false);
managementPanel.visibilityDeleteItemButton(false);
// Disable the button "Publish Item" is to inform the user that he/she has
// not the rights to publish
managementPanel.visibilityPublishItemButton(true, true);
managementPanel.enablePublishItemButton(false);
//RootPanel.get(GCubeCkanDataCatalog.LOGGED_IN_DIV).add(new HTML("Logged in as "+RolesCkanGroupOrOrg.MEMBER));
break; break;
} default:
default: { showEditInsertButtons(false);
managementPanel.visibilityEditItemButton(false);
managementPanel.visibilityDeleteItemButton(false);
// Disable the button "Publish Item" is to inform the user that he/she has
// not the rights to publish
managementPanel.visibilityPublishItemButton(true, true);
managementPanel.enablePublishItemButton(false);
break; break;
} }
}
} else {
managementPanel.visibilityPublishItemButton(false, true);
managementPanel.visibilityEditItemButton(false);
managementPanel.visibilityDeleteItemButton(false);
}
} }
}); });
@ -303,10 +268,6 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
GWT.log("Moderator role is assigned? " + isModeratorRoleAssingned); GWT.log("Moderator role is assigned? " + isModeratorRoleAssingned);
GWT.log("isExistsMyItemInModeration? " + isExistsMyItemInModeration); GWT.log("isExistsMyItemInModeration? " + isExistsMyItemInModeration);
if (isContentModerationEnabled) {
managementPanel.showMessageCatalogueIsModerated(isContentModerationEnabled);
}
// Enabling moderation if the moderation is active in the context and // Enabling moderation if the moderation is active in the context and
// the user has the role of MODERATOR in the context // the user has the role of MODERATOR in the context
if (isContentModerationEnabled && isModeratorRoleAssingned) { if (isContentModerationEnabled && isModeratorRoleAssingned) {
@ -449,15 +410,15 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
updateSize(); updateSize();
} }
// /** /**
// * show or hide the Publish/Update/Delete buttons according to the role. * show or hide edit/insert buttons according to the role.
// * *
// * @param show the show * @param show the show
// */ */
// public void showPublishUpdateDeleteButtons(boolean show) { public void showEditInsertButtons(boolean show) {
//
// managementPanel.visibilityUpdateDeleteButtons(show); managementPanel.showInsertAndEditProductButtons(show);
// } }
/** /**
* Instance ckan frame. * Instance ckan frame.
@ -598,8 +559,6 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
if (!isProductKeyMissing) { if (!isProductKeyMissing) {
latestSelectedProductIdentifier = productId.toString(); latestSelectedProductIdentifier = productId.toString();
managementPanel.enableShareItemButton(productId != null && !productId.isEmpty()); managementPanel.enableShareItemButton(productId != null && !productId.isEmpty());
managementPanel.enableEditItemButton(productId != null && !productId.isEmpty());
managementPanel.enableDeleteItemButton(productId != null && !productId.isEmpty());
managementPanel.enablePublishOnZenodoButton(productId != null && !productId.isEmpty()); managementPanel.enablePublishOnZenodoButton(productId != null && !productId.isEmpty());
managementPanel.enableManageGRSFProductButton( managementPanel.enableManageGRSFProductButton(
productId != null && !productId.isEmpty() && manageProductResponse.isManageEnabled()); productId != null && !productId.isEmpty() && manageProductResponse.isManageEnabled());

View File

@ -88,7 +88,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
try{ try{
// just get the current scope and set it into ScopeProvider... // just get the current scope and set it into ScopeProvider...
String loggedInScope = SessionUtil.getCurrentContext(getThreadLocalRequest(), true); SessionUtil.getCurrentContext(getThreadLocalRequest(), true);
// retrieve scope per current portlet url // retrieve scope per current portlet url
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest()); String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
@ -112,15 +112,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
pathInfoParameter = isViewPerVREEnabled(browserLocationURL); pathInfoParameter = isViewPerVREEnabled(browserLocationURL);
} }
//#26854
CkanConnectorAccessPoint ckAP = getCkanConnectorAccessPoint(browserLocationURL, pathInfoParameter, queryStringParameters, scopePerCurrentUrl); CkanConnectorAccessPoint ckAP = getCkanConnectorAccessPoint(browserLocationURL, pathInfoParameter, queryStringParameters, scopePerCurrentUrl);
ckAP.setLoggedInScope(loggedInScope);
ckAP.setOperativeScope(scopePerCurrentUrl);
if(loggedInScope!=null) {
ScopeBean scopeBeanLS = new ScopeBean(loggedInScope);
boolean loggedInVRE = scopeBeanLS.is(Type.VRE);
ckAP.setUserLoggedInVRE(loggedInVRE);
}
SessionUtil.saveCkanAccessPoint(this.getThreadLocalRequest().getSession(), scopePerCurrentUrl, ckAP); SessionUtil.saveCkanAccessPoint(this.getThreadLocalRequest().getSession(), scopePerCurrentUrl, ckAP);
logger.info("Built the URI to CKAN (connector in case of user logged): "+ckAP.buildURI()); logger.info("Built the URI to CKAN (connector in case of user logged): "+ckAP.buildURI());
logger.debug("returning ckanConnectorUri: "+ckAP); logger.debug("returning ckanConnectorUri: "+ckAP);
@ -246,8 +238,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER; RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER;
if(!SessionUtil.isIntoPortal()){ if(!SessionUtil.isIntoPortal()){
logger.warn("OUT FROM PORTAL DETECTED RETURNING ROLE: "+RolesCkanGroupOrOrg.ADMIN);
toReturn = RolesCkanGroupOrOrg.ADMIN; toReturn = RolesCkanGroupOrOrg.ADMIN;
logger.warn("OUT FROM PORTAL DETECTED RETURNING ROLE: "+toReturn);
}else{ }else{
HttpSession httpSession = this.getThreadLocalRequest().getSession(); HttpSession httpSession = this.getThreadLocalRequest().getSession();
@ -560,7 +552,6 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest()); String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl); DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl);
boolean moderationEnabled = catalogue.isModerationEnabled(reloadConfig); boolean moderationEnabled = catalogue.isModerationEnabled(reloadConfig);
logger.info("moderation Enabled? "+moderationEnabled);
return new ManageProductResponse(moderationEnabled, scopePerCurrentUrl); return new ManageProductResponse(moderationEnabled, scopePerCurrentUrl);
} }

View File

@ -6,7 +6,6 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
@ -32,11 +31,14 @@ import org.gcube.vomanagement.usermanagement.model.GatewayRolesNames;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
/** /**
* The Class UserUtil. * The Class UserUtil.
*
* @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 21, 2016 * @author Costantino Perciante costantino.perciante@isti.cnr.it
* Jun 21, 2016
*/ */
public class UserUtil { public class UserUtil {
@ -46,16 +48,15 @@ public class UserUtil {
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";
/** /**
* Gets the list vre for user and the role the user has in them. retrieve the * Gets the list vre for user and the role the user has in them.
* groups to whom a given user belongs (given the user EMail) * retrieve the groups to whom a given user belongs (given the user EMail)
*
* @param userEMail the user e mail * @param userEMail the user e mail
* @param httpSession * @param httpSession
* @param pathVre * @param pathVre
* @return the list vre for user * @return the list vre for user
*/ */
public static Map<String, String> getVreRoleForUser(String userEMail, String context, DataCatalogue instance, public static Map<String, String> getVreRoleForUser(String userEMail, String context, DataCatalogue instance, boolean isViewPerVREEnabled,
boolean isViewPerVREEnabled, HttpSession httpSession) { HttpSession httpSession){
GroupManager groupManager = new LiferayGroupManager(); GroupManager groupManager = new LiferayGroupManager();
UserManager userManager = new LiferayUserManager(); UserManager userManager = new LiferayUserManager();
@ -65,15 +66,14 @@ public class UserUtil {
try { try {
user = userManager.getUserByEmail(userEMail); user = userManager.getUserByEmail(userEMail);
// filter according the current context: if it is a VO/VRE, we send all the VRES // filter according the current context: if it is a VO/VRE, we send all the VRES under the VO. If it is the root vo, we send all user's vres.
// under the VO. If it is the root vo, we send all user's vres.
long groupIdContext = groupManager.getGroupIdFromInfrastructureScope(context); long groupIdContext = groupManager.getGroupIdFromInfrastructureScope(context);
GCubeGroup currentVRE = groupManager.getGroup(groupIdContext); GCubeGroup currentVRE = groupManager.getGroup(groupIdContext);
String localRoleInThisVre = RolesCkanGroupOrOrg.convertToCkanCapacity(getLiferayHighestRoleInOrg( String localRoleInThisVre = RolesCkanGroupOrOrg.convertToCkanCapacity(getLiferayHighestRoleInOrg(roleManager.listRolesByUserAndGroup(user.getUserId(), currentVRE.getGroupId())));
roleManager.listRolesByUserAndGroup(user.getUserId(), currentVRE.getGroupId())));
// ckan-connector will do it // ckan-connector will do it
mapRoleByGroupSingleVre.put(currentVRE.getGroupName().toLowerCase(), localRoleInThisVre); mapRoleByGroupSingleVre.put(currentVRE.getGroupName().toLowerCase(),
localRoleInThisVre);
// perform further checks // perform further checks
if(!isViewPerVREEnabled){ if(!isViewPerVREEnabled){
@ -81,8 +81,16 @@ public class UserUtil {
Boolean alreadyAdded = (Boolean)httpSession.getAttribute(keyPerScope); Boolean alreadyAdded = (Boolean)httpSession.getAttribute(keyPerScope);
if(alreadyAdded == null || !alreadyAdded){ if(alreadyAdded == null || !alreadyAdded){
new AddUserToOrganizationThread(instance, user, groupManager.listGroupsByUser(user.getUserId()), new AddUserToOrganizationThread(
isViewPerVREEnabled, groupIdContext, roleManager, groupManager, localRoleInThisVre).start(); instance,
user,
groupManager.listGroupsByUser(user.getUserId()),
isViewPerVREEnabled,
groupIdContext,
roleManager,
groupManager,
localRoleInThisVre).
start();
httpSession.setAttribute(keyPerScope, true); httpSession.setAttribute(keyPerScope, true);
} }
} }
@ -94,11 +102,9 @@ public class UserUtil {
} }
} }
/** /**
* Retrieve the highest ckan role the user has and also retrieve the list of * Retrieve the highest ckan role the user has and also retrieve the list of organizations (scopes) in which the user has the ckan-admin or ckan-editor role
* organizations (scopes) in which the user has the ckan-admin or ckan-editor
* role
*
* @param currentScope the current scope * @param currentScope the current scope
* @param username the current username * @param username the current username
* @param groupName the current groupName * @param groupName the current groupName
@ -106,9 +112,7 @@ public class UserUtil {
* @param orgsInWhichAdminRole * @param orgsInWhichAdminRole
* @param ckanUtils ckanUtils * @param ckanUtils ckanUtils
*/ */
public static RolesCkanGroupOrOrg getHighestRole(String currentScope, String username, String groupName, public static RolesCkanGroupOrOrg getHighestRole(String currentScope, String username, String groupName, GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl, List<OrganizationBean> orgsInWhichAtLeastEditorRole){
GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl,
List<OrganizationBean> orgsInWhichAtLeastEditorRole) {
// base role as default value // base role as default value
RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER; RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER;
@ -133,8 +137,7 @@ public class UserUtil {
// root (so check into the root, the VOs and the VRES) // root (so check into the root, the VOs and the VRES)
if(groupManager.isRootVO(currentGroupId)){ if(groupManager.isRootVO(currentGroupId)){
logger.info("The current scope is the Root Vo, so the list of organizations of the user " + username logger.info("The current scope is the Root Vo, so the list of organizations of the user " + username + " is " + groups);
+ " is " + groups);
for (GCubeGroup gCubeGroup : groups) { for (GCubeGroup gCubeGroup : groups) {
@ -145,16 +148,14 @@ public class UserUtil {
String gCubeGroupName = gCubeGroup.getGroupName(); String gCubeGroupName = gCubeGroup.getGroupName();
// get the role of the users in this group // get the role of the users in this group
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, groupManager.getGroupId(gCubeGroupName));
groupManager.getGroupId(gCubeGroupName));
// get highest role // get highest role
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles); RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
// be sure it is so // be sure it is so
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
orgsInWhichAtLeastEditorRole);
toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck); toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck);
@ -162,8 +163,7 @@ public class UserUtil {
}else if(groupManager.isVO(currentGroupId)){ }else if(groupManager.isVO(currentGroupId)){
logger.debug("The list of organizations of the user " + username + " to scan is the one under the VO " logger.debug("The list of organizations of the user " + username + " to scan is the one under the VO " + groupName);
+ groupName);
for (GCubeGroup gCubeGroup : groups) { for (GCubeGroup gCubeGroup : groups) {
@ -173,23 +173,20 @@ public class UserUtil {
String gCubeGroupName = gCubeGroup.getGroupName(); String gCubeGroupName = gCubeGroup.getGroupName();
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, groupManager.getGroupId(gCubeGroupName));
groupManager.getGroupId(gCubeGroupName));
// get highest role // get highest role
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles); RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
// be sure it is so // be sure it is so
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
orgsInWhichAtLeastEditorRole);
toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck); toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck);
} }
}else if(groupManager.isVRE(currentGroupId)){ }else if(groupManager.isVRE(currentGroupId)){
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userManager.getUserId(username), List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userManager.getUserId(username), groupManager.getGroupId(groupName));
groupManager.getGroupId(groupName));
logger.debug("The current scope is the vre " + groupName); logger.debug("The current scope is the vre " + groupName);
@ -197,8 +194,8 @@ public class UserUtil {
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles); RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
// the ckan connector already did the job for us but we need name and title // the ckan connector already did the job for us but we need name and title
checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId, correspondentRoleToCheck, checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId,
groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole); correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
toReturn = correspondentRoleToCheck; toReturn = correspondentRoleToCheck;
@ -214,9 +211,7 @@ public class UserUtil {
} }
/** /**
* Check if the role admin/editor is set or must be set into the ckan instance * Check if the role admin/editor is set or must be set into the ckan instance at this scope
* at this scope
*
* @param username * @param username
* @param gCubeGroupName * @param gCubeGroupName
* @param groupId * @param groupId
@ -227,16 +222,14 @@ public class UserUtil {
* @throws UserManagementSystemException * @throws UserManagementSystemException
* @throws GroupRetrievalFault * @throws GroupRetrievalFault
*/ */
private static void checkIfRoleIsSetInCkanInstance(String username, String gCubeGroupName, long groupId, private static void checkIfRoleIsSetInCkanInstance(String username,
RolesCkanGroupOrOrg correspondentRoleToCheck, GroupManager groupManager, String gCubeGroupName, long groupId,
GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl, RolesCkanGroupOrOrg correspondentRoleToCheck,
List<OrganizationBean> orgsInWhichAtLeastEditorRole) GroupManager groupManager,
throws UserManagementSystemException, GroupRetrievalFault { GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl, List<OrganizationBean> orgsInWhichAtLeastEditorRole) throws UserManagementSystemException, GroupRetrievalFault {
// with this invocation, we check if the role is present in ckan and if it is // with this invocation, we check if the role is present in ckan and if it is not it will be added
// not it will be added DataCatalogue catalogue = gcubeCkanDataCatalogServiceImpl.getCatalogue(groupManager.getInfrastructureScope(groupId));
DataCatalogue catalogue = gcubeCkanDataCatalogServiceImpl
.getCatalogue(groupManager.getInfrastructureScope(groupId));
// if there is an instance of ckan in this scope.. // if there is an instance of ckan in this scope..
if(catalogue != null){ if(catalogue != null){
@ -245,54 +238,31 @@ public class UserUtil {
if(res && !correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.MEMBER)){ if(res && !correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.MEMBER)){
// get the orgs of the user and retrieve its title and name // get the orgs of the user and retrieve its title and name
CkanOrganization organization = catalogue.getOrganizationByName(gCubeGroupName.toLowerCase()); CkanOrganization organization = catalogue.getOrganizationByName(gCubeGroupName.toLowerCase());
orgsInWhichAtLeastEditorRole orgsInWhichAtLeastEditorRole.add(new OrganizationBean(organization.getTitle(), organization.getName(), true));
.add(new OrganizationBean(organization.getTitle(), organization.getName(), true));
} }
} else }
logger.warn( else
"It seems there is no ckan instance into scope " + groupManager.getInfrastructureScope(groupId)); logger.warn("It seems there is no ckan instance into scope " + groupManager.getInfrastructureScope(groupId));
} }
/** /**
* Retrieve the ckan role among a list of liferay roles * Retrieve the ckan role among a list of liferay roles
*
* @param roles * @param roles
* @return MEMBER/EDITOR/ADMIN role * @return MEMBER/EDITOR/ADMIN role
*/ */
public static RolesCkanGroupOrOrg getLiferayHighestRoleInOrg(List<GCubeRole> roles) { public static RolesCkanGroupOrOrg getLiferayHighestRoleInOrg(
logger.info("getLiferayHighestRoleInOrg in: " + roles); List<GCubeRole> roles) {
RolesCkanGroupOrOrg highestRoleFound = null; // NOTE: it is supposed that there is just one role for this person correspondent to the one in the catalog
for (GCubeRole gCubeRole : roles) {
if(roles==null || roles.isEmpty()) { if(gCubeRole.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_ADMIN.getRoleName())){
highestRoleFound = RolesCkanGroupOrOrg.MEMBER; return RolesCkanGroupOrOrg.ADMIN;
logger.info("getLiferayHighestRoleInOrg returns: " + highestRoleFound +", as default");
return highestRoleFound;
} }
if(gCubeRole.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_EDITOR.getRoleName())){
List<GCubeRole> adminList = roles.stream() return RolesCkanGroupOrOrg.EDITOR;
.filter(a -> a.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_ADMIN.getRoleName())) }
.collect(Collectors.toList()); }
return RolesCkanGroupOrOrg.MEMBER;
if (adminList.size() > 0) {
highestRoleFound = RolesCkanGroupOrOrg.ADMIN;
logger.info("getLiferayHighestRoleInOrg returns: " + highestRoleFound);
return highestRoleFound;
}
List<GCubeRole> editorList = roles.stream()
.filter(a -> a.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_EDITOR.getRoleName()))
.collect(Collectors.toList());
if (editorList.size() > 0) {
highestRoleFound = RolesCkanGroupOrOrg.EDITOR;
logger.info("getLiferayHighestRoleInOrg returns: " + highestRoleFound);
return highestRoleFound;
}
highestRoleFound = RolesCkanGroupOrOrg.MEMBER;
logger.info("getLiferayHighestRoleInOrg returns: " + highestRoleFound);
return highestRoleFound;
} }
} }

View File

@ -10,10 +10,12 @@ import java.util.Set;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl;
/** /**
* The Class CkanConnectorAccessPoint. * The Class CkanConnectorAccessPoint.
* *
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jun 23, 2016 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jun 23, 2016
*/ */
public class CkanConnectorAccessPoint implements Serializable{ public class CkanConnectorAccessPoint implements Serializable{
@ -35,10 +37,6 @@ public class CkanConnectorAccessPoint implements Serializable {
private boolean outsideLoginOnPortal = false; private boolean outsideLoginOnPortal = false;
private String catalogueBaseUrl = null; private String catalogueBaseUrl = null;
private String operativeScope = null;
private String loggedInScope = null;
private boolean isUserLoggedInVRE = false;
/** /**
* Instantiates a new ckan connector access point. * Instantiates a new ckan connector access point.
*/ */
@ -64,10 +62,10 @@ public class CkanConnectorAccessPoint implements Serializable {
* @param value the value * @param value the value
*/ */
public void addGenericParameter(String key, String value){ public void addGenericParameter(String key, String value){
queryStringParameters = queryStringParameters == null ? key + "=" + value queryStringParameters=queryStringParameters==null?key+"="+value:queryStringParameters+"&"+key+"="+value;
: queryStringParameters + "&" + key + "=" + value;
} }
/** /**
* Adds the query string. * Adds the query string.
* *
@ -110,8 +108,7 @@ public class CkanConnectorAccessPoint implements Serializable {
for (Entry<String, String> entry : set) { for (Entry<String, String> entry : set) {
vres += entry.getKey().toLowerCase() + "|" + entry.getValue() + ","; vres += entry.getKey().toLowerCase() + "|" + entry.getValue() + ",";
} }
vres = vres.substring(0, vres.length() - 1); // remove last "," and to lower case. A CKAN Organization ID vres = vres.substring(0, vres.length()-1); //remove last "," and to lower case. A CKAN Organization ID must be lower case
// must be lower case
} }
if(vres.length()>0){ if(vres.length()>0){
@ -128,8 +125,9 @@ public class CkanConnectorAccessPoint implements Serializable {
pathInfoParameter = pathInfo; pathInfoParameter = pathInfo;
} }
/** /**
* Builds the URI to contact the CKAN (connector in case of user logged). * Builds the URI to contact the CKAN (connector in case of user logged)
* *
* @return the string * @return the string
*/ */
@ -144,55 +142,6 @@ public class CkanConnectorAccessPoint implements Serializable {
return url; return url;
} }
/**
* Gets the operative scope.
*
* @return the operative scope
*/
public String getOperativeScope() {
return operativeScope;
}
/**
* Gets the logged in scope.
*
* @return the logged in scope
*/
public String getLoggedInScope() {
return loggedInScope;
}
public boolean isUserLoggedInVRE() {
return isUserLoggedInVRE;
}
/**
* Sets the user logged in VRE.
*
* @param isUserLoggedInVRE the new user logged in VRE
*/
public void setUserLoggedInVRE(boolean isUserLoggedInVRE) {
this.isUserLoggedInVRE = isUserLoggedInVRE;
}
/**
* Sets the operative scope.
*
* @param operativeScope the new operative scope
*/
public void setOperativeScope(String operativeScope) {
this.operativeScope = operativeScope;
}
/**
* Sets the logged in scope.
*
* @param loggedInScope the new logged in scope
*/
public void setLoggedInScope(String loggedInScope) {
this.loggedInScope = loggedInScope;
}
/** /**
* Gets the base url with context. * Gets the base url with context.
* *
@ -203,6 +152,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return baseUrl+serviceContext; return baseUrl+serviceContext;
} }
/** /**
* Gets the path info parameter. * Gets the path info parameter.
* *
@ -213,6 +163,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return pathInfoParameter; return pathInfoParameter;
} }
/** /**
* Gets the query string parameters. * Gets the query string parameters.
* *
@ -223,6 +174,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return queryStringParameters; return queryStringParameters;
} }
/** /**
* Gets the gcube token value. * Gets the gcube token value.
* *
@ -233,6 +185,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return gcubeTokenValue; return gcubeTokenValue;
} }
/** /**
* Gets the list of v res. * Gets the list of v res.
* *
@ -247,14 +200,9 @@ public class CkanConnectorAccessPoint implements Serializable {
* Check url path separator. * Check url path separator.
* *
* @param url the url * @param url the url
* @param head - checks the * @param head - checks the {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR} in head adding if do not exist
* {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR} in * @param tail - checks the {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR} in tail adding if do not exist
* head adding if do not exist * @return the string - if null return an empty string otherwise a string with {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR}
* @param tail - checks the
* {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR} in
* tail adding if do not exist
* @return the string - if null return an empty string otherwise a string with
* {@link GcubeCkanDataCatalogServiceImpl.URL_PATH_SEPARATOR}
*/ */
public static String checkURLPathSeparator(String url, boolean head, boolean tail){ public static String checkURLPathSeparator(String url, boolean head, boolean tail){
@ -269,6 +217,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return url; return url;
} }
/** /**
* Gets the base url. * Gets the base url.
* *
@ -279,6 +228,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return baseUrl; return baseUrl;
} }
/** /**
* Check null string. * Check null string.
* *
@ -293,6 +243,8 @@ public class CkanConnectorAccessPoint implements Serializable {
return value; return value;
} }
/** /**
* Checks if is outside login on portal. * Checks if is outside login on portal.
* *
@ -303,6 +255,7 @@ public class CkanConnectorAccessPoint implements Serializable {
return outsideLoginOnPortal; return outsideLoginOnPortal;
} }
/** /**
* Sets the outside login on portal. * Sets the outside login on portal.
* *
@ -322,14 +275,8 @@ public class CkanConnectorAccessPoint implements Serializable {
return catalogueBaseUrl; return catalogueBaseUrl;
} }
/**
* To string. /* (non-Javadoc)
*
* @return the string
*/
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
@Override @Override

View File

@ -20,10 +20,6 @@
<inherits <inherits
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' /> name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
<inherits
name='org.gcube.portlets.widgets.mpformbuilder.MetadataProfileFormBuilder' />
<inherits <inherits
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' /> name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
<inherits <inherits
@ -33,9 +29,6 @@
<inherits <inherits
name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits
name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
<inherits <inherits
name='org.gcube.portlets.widgets.switchbutton.SwitchButton' /> name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
<inherits <inherits
@ -43,6 +36,7 @@
<inherits <inherits
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' /> name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point <entry-point
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' /> class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />

View File

@ -158,32 +158,3 @@ h1 {
.modal-content-moderator .modal-body { .modal-content-moderator .modal-body {
min-height: 720px; min-height: 720px;
} }
.moderation-enabled-flag {
float: right;
margin-right: 10px;
padding: 8px !important;
border-radius: 12px !important;
margin-top: 5px;
}
.nav_bar_catalogue {
background-color: none !important;
margin-bottom: 0px !important;
margin-left: 10px;
margin-right: 5px;
padding: 5px;
}
.nav_bar_catalogue .navbar-inner {
background-image: none !important;
padding: 10px 5px;
background-color: #FAFAFA;
}
.logged_in_label {
float: right;
margin-right: 20px;
font-size: 12px;
padding-top: 5px;
}

View File

@ -37,7 +37,6 @@
Your web browser must have JavaScript enabled in order for this Your web browser must have JavaScript enabled in order for this
application to display correctly.</div> application to display correctly.</div>
</noscript> </noscript>
<div id="logged_in" class="logged_in_label"></div>
<div id="gCubeCkanDataCatalog"></div> <div id="gCubeCkanDataCatalog"></div>
</body> </body>
</html> </html>

View File

@ -32,5 +32,5 @@
<script type="text/javascript" <script type="text/javascript"
src='<%=request.getContextPath()%>/js/jquery.autosize.js'></script> src='<%=request.getContextPath()%>/js/jquery.autosize.js'></script>
<div id="logged_in" class="logged_in_label"></div>
<div id="gCubeCkanDataCatalog"></div> <div id="gCubeCkanDataCatalog"></div>

View File

@ -11,6 +11,13 @@
<param-value>/gcube/service/connect</param-value> <param-value>/gcube/service/connect</param-value>
</context-param> </context-param>
<!-- <context-param> -->
<!-- <description>Used like GET parameter in order to hide header section
of CKAN template from gCube Portal</description> -->
<!-- <param-name>CkanHideHeader</param-name> -->
<!-- <param-value>hh</param-value> -->
<!-- </context-param> -->
<context-param> <context-param>
<description>ckan connector logout from CKAN</description> <description>ckan connector logout from CKAN</description>
<param-name>CkanConnectorLogout</param-name> <param-name>CkanConnectorLogout</param-name>
@ -23,6 +30,16 @@
<servlet-class>org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl</servlet-class> <servlet-class>org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl</servlet-class>
</servlet> </servlet>
<!-- <servlet> -->
<!-- <servlet-name>gcubeckanlogout</servlet-name> -->
<!-- <servlet-class>org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.CkanLogout</servlet-class> -->
<!-- </servlet> -->
<!-- <servlet> -->
<!-- <servlet-name>checkServlet</servlet-name> -->
<!-- <servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class> -->
<!-- </servlet> -->
<servlet> <servlet>
<servlet-name>ckanpublisherservices</servlet-name> <servlet-name>ckanpublisherservices</servlet-name>
<servlet-class>org.gcube.portlets.widgets.ckandatapublisherwidget.server.CKANPublisherServicesImpl</servlet-class> <servlet-class>org.gcube.portlets.widgets.ckandatapublisherwidget.server.CKANPublisherServicesImpl</servlet-class>
@ -38,11 +55,6 @@
<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>
<servlet>
<servlet-name>workspaceExplorer</servlet-name>
<servlet-class>org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl</servlet-class>
</servlet>
<!-- Servlets --> <!-- Servlets -->
<servlet> <servlet>
<servlet-name>ckanToZenodoServlet</servlet-name> <servlet-name>ckanToZenodoServlet</servlet-name>
@ -54,17 +66,6 @@
<servlet-class>org.gcube.portlets.widgets.ckancontentmoderator.server.CkanContentModeratorServiceImpl</servlet-class> <servlet-class>org.gcube.portlets.widgets.ckancontentmoderator.server.CkanContentModeratorServiceImpl</servlet-class>
</servlet> </servlet>
<servlet>
<servlet-name>metadataProfileFormBuilderUploadServlet</servlet-name>
<servlet-class>org.gcube.portlets.widgets.mpformbuilder.server.MetadataProfileFormBuilderUploadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>metadataProfileFormBuilderUploadServlet</servlet-name>
<url-pattern>/gCubeCkanDataCatalog/metadataProfileFormBuilderUploadServlet</url-pattern>
</servlet-mapping>
<servlet-mapping> <servlet-mapping>
<servlet-name>ckanContentModeratorServlet</servlet-name> <servlet-name>ckanContentModeratorServlet</servlet-name>
<url-pattern>/gCubeCkanDataCatalog/ckanContentModeratorService</url-pattern> <url-pattern>/gCubeCkanDataCatalog/ckanContentModeratorService</url-pattern>
@ -96,12 +97,6 @@
<url-pattern>/gCubeCkanDataCatalog/grsfmanageservice</url-pattern> <url-pattern>/gCubeCkanDataCatalog/grsfmanageservice</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping>
<servlet-name>workspaceExplorer</servlet-name>
<url-pattern>/gCubeCkanDataCatalog/WorkspaceExplorerService</url-pattern>
</servlet-mapping>
<!-- <servlet-mapping> --> <!-- <servlet-mapping> -->
<!-- <servlet-name>gcubeckanlogout</servlet-name> --> <!-- <servlet-name>gcubeckanlogout</servlet-name> -->
<!-- <url-pattern>/gCubeCkanDataCatalog/gcubeckanlogout</url-pattern> --> <!-- <url-pattern>/gCubeCkanDataCatalog/gcubeckanlogout</url-pattern> -->