feature_23491 #2

Merged
francesco.mangiacrapa merged 2 commits from feature_23491 into master 2022-06-14 16:54:40 +02:00
5 changed files with 568 additions and 549 deletions

View File

@ -4,101 +4,105 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.1.0-SNAPSHOT] - 2022-06-13
**Enhancements**
- [#23491] The final URL provided to go to the item is the "Catalogue Portlet URL"
## [v2.0.1] - 2021-05-24 ## [v2.0.1] - 2021-05-24
**Bug fixes** **Bug fixes**
[#21470] Fixing: publishing widget uses the orgTitle instead of orgName - [#21470] Fixing: publishing widget uses the orgTitle instead of orgName
**New** **New**
Moved to maven-portal-bom 3.6.2 - Moved to maven-portal-bom 3.6.2
## [v2.0.0] - 2021-04-12 ## [v2.0.0] - 2021-04-12
**Enhancements** **Enhancements**
[#19764] Porting ckan-metadata-publisher-widget to catalogue-util-library - [#19764] Porting ckan-metadata-publisher-widget to catalogue-util-library
[#20680] Ported to SHUB - [#20680] Ported to SHUB
[#19568] Unify and extend the tags allowed values - [#19568] Unify and extend the tags allowed values
[#20828] Revisited title size and format - [#20828] Revisited title size and format
[#20868] Redesigned the "Manage Resources" user experience - [#20868] Redesigned the "Manage Resources" user experience
[#21068] Add Resources facility: only HTTPS URLs must be allowed - [#21068] Add Resources facility: only HTTPS URLs must be allowed
[#21153] Upgrade the maven-portal-bom to 3.6.1 version - [#21153] Upgrade the maven-portal-bom to 3.6.1 version
## [v1.6.2] - 2021-02-08 ## [v1.6.2] - 2021-02-08
**Bug Fixes** **Bug Fixes**
[#20446] Catalogue Publishing Widget: field value unexpectedly added in case of optional field - [#20446] Catalogue Publishing Widget: field value unexpectedly added in case of optional field
[#20663] Fixing Time_Interval placeholder - [#20663] Fixing Time_Interval placeholder
## [v1.6.1] [r4.24.0] - 2020-06-18 ## [v1.6.1] - 2020-06-18
**New Features** **New Features**
[#18700] Do not skip regex validation on catalogue item when a field is empty (UI side) - [#18700] Do not skip regex validation on catalogue item when a field is empty (UI side)
## [v1.6.0] - 2019-09-25 ## [v1.6.0] - 2019-09-25
[Feature #11331] Field repeatability: support for catalogue widget - [Feature #11331] Field repeatability: support for catalogue widget
[Task #12480] Data Catalogue Publishing widget: filter the VREs for the working gateway widget - [Task #12480] Data Catalogue Publishing widget: filter the VREs for the working gateway widget
[Feature #17577] Modify ckan-metadata-publisher-widget posts to cite people with @username - [Feature #17577] Modify ckan-metadata-publisher-widget posts to cite people with @username
[Support #13188] Fixed some logs - [Support #13188] Fixed some logs
## [v1.5.0] - 2019-06-11 ## [v1.5.0] - 2019-06-11
[Feature #13074] Integrated with 'openlayer-basic-widgets' - [Feature #13074] Integrated with 'openlayer-basic-widgets'
## [v1.4.1] - 2018-11-20 ## [v1.4.1] - 2018-11-20
[Bug #12914] The form to add/choice the resources to publishing remains frozen - [Bug #12914] The form to add/choice the resources to publishing remains frozen
## [v1.4.0] - 2018-09-28 ## [v1.4.0] - 2018-09-28
[Incident #12563] Error when trying to publish the content of a workspace folder into the catalogue - [Incident #12563] Error when trying to publish the content of a workspace folder into the catalogue
## [v1.3.3] - 2018-03-02 ## [v1.3.3] - 2018-03-02
Minor update - Minor update
## [v1.3.2] - 2018-02-26 ## [v1.3.2] - 2018-02-26
Minor update due to interface changed - Minor update due to interface changed
## [v1.3.1] - 2017-06-26 ## [v1.3.1] - 2017-06-26
External Url files are properly managed as resources - External Url files are properly managed as resources
## [v1.3.0] - 2017-05-05 ## [v1.3.0] - 2017-05-05
Metadata model v.3 supported - Metadata model v.3 supported
## [v1.2.3] - 2017-04-05 ## [v1.2.3] - 2017-04-05
Some bug fixes - Some bug fixes
## [v1.2.2] - 2017-02-27 ## [v1.2.2] - 2017-02-27
Some minor terms changed - Some minor terms changed
added support for ticket #7207 - added support for ticket #7207
## [v1.2.1] - 2017-02-02 ## [v1.2.1] - 2017-02-02

View File

@ -13,7 +13,7 @@
<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.0.1</version> <version>2.1.0-SNAPSHOT</version>
<name>gCube Ckan metadata publisher widget</name> <name>gCube Ckan metadata publisher widget</name>
<description> <description>
@ -42,7 +42,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>3.6.2</version> <version>3.6.2-SNAPSHOT</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

View File

@ -58,20 +58,19 @@ public class AddResourceToDataset extends Composite{
@UiField ControlGroup urlControlGroup; @UiField ControlGroup urlControlGroup;
@UiField ControlGroup nameControlGroup; @UiField ControlGroup nameControlGroup;
public AddResourceToDataset(HandlerManager eventBus, String datasetId, String datasetOrg, String owner, final String datasetUrl) { public AddResourceToDataset(HandlerManager eventBus, String datasetId, String datasetTitle, String datasetOrg, String owner, final String datasetUrl) {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
// save bus // save bus
this.eventBus = eventBus; this.eventBus = eventBus;
// save dataset id (it is needed when we will add resources) // save dataset id (it is needed when we will add resources)
this.datasetId = datasetId; this.datasetId = datasetId;
this.datasetOrg = datasetOrg; this.datasetOrg = datasetOrg;
goToDatasetButton.setText(
(datasetUrl.length() > 100 ? String title = datasetTitle;
datasetUrl.substring(0, 100) + "..." : datasetUrl) String link = "";
); link += title.length() > 90 ? title.substring(0, 90) + "..." : title;
goToDatasetButton.setTitle("Go to the item: "+title);
goToDatasetButton.setText(link);
// goToDatasetButton.setHref(datasetUrl); // goToDatasetButton.setHref(datasetUrl);
goToDatasetButton.addClickHandler(new ClickHandler() { goToDatasetButton.addClickHandler(new ClickHandler() {

View File

@ -431,57 +431,12 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
toCreate.setId(datasetId); toCreate.setId(datasetId);
// retrieve the url // retrieve the url
String datasetUrl = utils.getUnencryptedUrlFromDatasetIdOrName(datasetId); //String datasetUrl = utils.getUnencryptedUrlFromDatasetIdOrName(datasetId);
toCreate.setSource(datasetUrl); //toCreate.setSource(datasetUrl);
// add also this information as custom field
/**
* TODO NEEDED TO BE CHECK
*
* OLD CODE NOT NEEDED. NOW IT IS PERFORMED BY gCAT
Map<String, List<String>> addField = new HashMap<String, List<String>>();
addField.put(ITEM_URL_FIELD, Arrays.asList(datasetUrl));
utils.patchProductCustomFields(datasetId, userApiKey, addField, false);
*/ //#23491 Building the go to the item to "Catalogue Portlet URL" (instead of URI Resolver URL)
String catalogueURL = utils.getPortletUrl();
//TODO SHOULD BE NOTIFIED by gCAT toCreate.setSource(String.format("%s?path=/dataset/%s", catalogueURL,datasetId));
// start a thread that will associate this dataset with the group
// if(/*toCreate.getChosenType() != null ||*/ toCreate.getGroups() != null){
//
// AssociationToGroupAndNotifyThread threadAssociationToGroup =
// new AssociationToGroupAndNotifyThread(
// toCreate.getGroups(),
// toCreate.getGroupsForceCreation(),
// null, //toCreate.getChosenType(), TODO
// datasetUrl,
// datasetId,
// toCreate.getTitle(),
// GenericUtils.getCurrentUser(getThreadLocalRequest()).getFullname(),
// userName,
// utils,
// organizationNameOrId,
// getThreadLocalRequest()
// );
// threadAssociationToGroup.start();
//
// }
//
// // launch notification thread
// WritePostCatalogueManagerThread threadWritePost =
// new WritePostCatalogueManagerThread(
// userName,
// scope,
// toCreate.getTitle(),
// datasetUrl,
// false, // send notification to other people
// toCreate.getTags(),
// GenericUtils.getCurrentUser(getThreadLocalRequest()).getFullname(),
// GenericUtils.getCurrentClientUrl(getThreadLocalRequest())
// );
// threadWritePost.start();
return toCreate; return toCreate;
}else{ }else{
logger.error("Failed to create the dataset"); logger.error("Failed to create the dataset");