[#26639] sync ckan-metadata-publisher-widget ->

metadata-profile-form-builder-widget model
This commit is contained in:
Francesco Mangiacrapa 2024-02-05 17:03:25 +01:00
parent b188a63e68
commit f98ccd3bfc
9 changed files with 142 additions and 22 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.2.6-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-2.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -30,5 +30,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.2.6-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-2.3.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,6 +1,6 @@
>>>>>>>=refs/heads/task_20699
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.2.6-SNAPSHOT
lastWarOutDir=/home/francescomangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-2.3.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -52,7 +52,29 @@
<wb-module deploy-name="gcube-ckan-datacatalog-2.2.6-SNAPSHOT">
<wb-module deploy-name="gcube-ckan-datacatalog-2.3.0-SNAPSHOT">
@ -139,6 +161,17 @@
@ -193,6 +226,17 @@
@ -215,9 +259,23 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="ckan2zenodo-publisher-widget-1.1.3.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan2zenodo-publisher-widget/ckan2zenodo-publisher-widget">
<dependent-module archiveName="metadata-profile-form-builder-widget-2.1.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ckan-metadata-publisher-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-metadata-publisher-widget/ckan-metadata-publisher-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -304,6 +362,17 @@
@ -358,6 +427,17 @@
@ -412,6 +492,17 @@

View File

@ -4,6 +4,10 @@
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).
## [v2.3.0-SNAPSHOT] - 2024-02-02
- Supported the Edit facility [#26639]
## [v2.2.7] - 2023-12-21
- Including "Upload to Zenodo" fix [#26166]

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.gcubeckan</groupId>
<artifactId>gcube-ckan-datacatalog</artifactId>
<packaging>war</packaging>
<version>2.2.7</version>
<version>2.3.0-SNAPSHOT</version>
<name>gCube CKAN Data Catalog</name>
<description>The gCube CKAN Data Catalog portlet</description>
@ -125,6 +125,12 @@
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</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>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>ckan-metadata-publisher-widget</artifactId>

View File

@ -20,6 +20,10 @@
<inherits
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
<inherits
name='org.gcube.portlets.widgets.mpformbuilder.MetadataProfileFormBuilder' />
<inherits
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
<inherits
@ -36,7 +40,6 @@
<inherits
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />

View File

@ -30,6 +30,7 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGro
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.mpformbuilder.shared.catalogue.OrganizationBeanProfile;
import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
@ -299,20 +300,20 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
* @param username the username
* @return the list
*/
private List<OrganizationBean> fetchUserGroups(String context, String username) {
private List<OrganizationBeanProfile> fetchUserGroups(String context, String username) {
List<OrganizationBean> toReturn = null;
List<OrganizationBeanProfile> toReturn = null;
logger.info("Preloading user's groups");
try{
DataCatalogue catalogue = getCatalogue(context);
toReturn = new ArrayList<OrganizationBean>();
toReturn = new ArrayList<OrganizationBeanProfile>();
Map<String, Map<CkanGroup, RolesCkanGroupOrOrg>> mapRoleGroup = catalogue.getUserRoleByGroup(username);
Set<Entry<String, Map<CkanGroup, RolesCkanGroupOrOrg>>> set = mapRoleGroup.entrySet();
for (Entry<String, Map<CkanGroup, RolesCkanGroupOrOrg>> entry : set) {
Set<Entry<CkanGroup, RolesCkanGroupOrOrg>> subSet = entry.getValue().entrySet();
for (Entry<CkanGroup, RolesCkanGroupOrOrg> subEntry : subSet) {
toReturn.add(new OrganizationBean(subEntry.getKey().getTitle(), subEntry.getKey().getName(), false));
toReturn.add(new OrganizationBeanProfile(subEntry.getKey().getTitle(), subEntry.getKey().getName(), false));
}
}

View File

@ -20,6 +20,10 @@
<inherits
name='org.gcube.portlets_widgets.catalogue_sharing_widget.ShareCatalogue' />
<inherits
name='org.gcube.portlets.widgets.mpformbuilder.MetadataProfileFormBuilder' />
<inherits
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
<inherits
@ -36,7 +40,6 @@
<inherits
name='org.gcube.portlets.widgets.ckancontentmoderator.CkanContentModeratorWidget' />
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />

View File

@ -49,6 +49,18 @@
<servlet-class>org.gcube.portlets.widgets.ckancontentmoderator.server.CkanContentModeratorServiceImpl</servlet-class>
</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-name>ckanContentModeratorServlet</servlet-name>
<url-pattern>/gCubeCkanDataCatalog/ckanContentModeratorService</url-pattern>