update for fix in #9076
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@150579 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
37041ebf38
commit
17285fe73e
|
@ -1,29 +1,52 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-3-0" date="2017-05-05">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-3-1"
|
||||||
|
date="2017-06-26">
|
||||||
|
<Change>External Url files are properly managed as resources</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-3-0"
|
||||||
|
date="2017-05-05">
|
||||||
<Change>Metadata model v.3 supported</Change>
|
<Change>Metadata model v.3 supported</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-3" date="2017-04-05">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-3"
|
||||||
|
date="2017-04-05">
|
||||||
<Change>Some bug fixes</Change>
|
<Change>Some bug fixes</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-2" date="2017-02-27">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-2"
|
||||||
|
date="2017-02-27">
|
||||||
<Change>Some minor terms changed</Change>
|
<Change>Some minor terms changed</Change>
|
||||||
<Change>added support for ticket #7207</Change>
|
<Change>added support for ticket #7207</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-1" date="2017-02-02">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-1"
|
||||||
|
date="2017-02-02">
|
||||||
<Change>Minor fixes to speed up role retrievals</Change>
|
<Change>Minor fixes to speed up role retrievals</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-0" date="2016-12-11">
|
<Changeset
|
||||||
<Change>A post is automatically created by the Product Catalogue user every time someone publishes</Change>
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-2-0"
|
||||||
<Change>The user now can select all files in the hierarchy and publish them</Change>
|
date="2016-12-11">
|
||||||
<Change>The user can now associate the product to the available groups</Change>
|
<Change>A post is automatically created by the Product Catalogue user
|
||||||
|
every time someone publishes</Change>
|
||||||
|
<Change>The user now can select all files in the hierarchy and publish
|
||||||
|
them</Change>
|
||||||
|
<Change>The user can now associate the product to the available groups
|
||||||
|
</Change>
|
||||||
<Change>Removed ASL session dependency</Change>
|
<Change>Removed ASL session dependency</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-1-0" date="2016-10-11">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-1-0"
|
||||||
|
date="2016-10-11">
|
||||||
<Change>Creation of a group is now supported</Change>
|
<Change>Creation of a group is now supported</Change>
|
||||||
<Change>Association of a dataset to a group is now supported</Change>
|
<Change>Association of a dataset to a group is now supported</Change>
|
||||||
<Change>Products are copied to .catalogue area when publishing is performed from workspace</Change>
|
<Change>Products are copied to .catalogue area when publishing is
|
||||||
|
performed from workspace</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-0-0" date="2016-06-01">
|
<Changeset
|
||||||
|
component="org.gcube.portlets-widgets.ckan-metadata-publisher-widget.1-0-0"
|
||||||
|
date="2016-06-01">
|
||||||
<Change>First Release</Change>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
</ReleaseNotes>
|
</ReleaseNotes>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,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>1.3.0-SNAPSHOT</version>
|
<version>1.3.1-SNAPSHOT</version>
|
||||||
<name>gCube Ckan metadata publisher widget</name>
|
<name>gCube Ckan metadata publisher widget</name>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.gcube.common.homelibary.model.items.type.FolderItemType;
|
||||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||||
|
@ -15,6 +16,7 @@ import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||||
import org.gcube.common.homelibrary.home.workspace.catalogue.WorkspaceCatalogue;
|
import org.gcube.common.homelibrary.home.workspace.catalogue.WorkspaceCatalogue;
|
||||||
import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
||||||
|
import org.gcube.common.homelibrary.home.workspace.folder.items.ExternalUrl;
|
||||||
import org.gcube.common.homelibrary.home.workspace.folder.items.GCubeItem;
|
import org.gcube.common.homelibrary.home.workspace.folder.items.GCubeItem;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.server.utils.UtilMethods;
|
import org.gcube.datacatalogue.ckanutillibrary.server.utils.UtilMethods;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
|
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
|
||||||
|
@ -253,8 +255,17 @@ public class WorkspaceUtils {
|
||||||
// name and description could have been edited
|
// name and description could have been edited
|
||||||
copiedFile.setDescription(resource.getDescription());
|
copiedFile.setDescription(resource.getDescription());
|
||||||
|
|
||||||
|
// check if it is an external url
|
||||||
|
String externalUrl = null;
|
||||||
|
try{
|
||||||
|
boolean isExternalUrl = ((FolderItem)copiedFile).getFolderItemType().equals(FolderItemType.EXTERNAL_URL);
|
||||||
|
externalUrl = isExternalUrl ? ((ExternalUrl)copiedFile).getUrl() : null;
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.warn("Unable to check if it is an external url file ", e);
|
||||||
|
}
|
||||||
|
|
||||||
resources.add(new ResourceBean(
|
resources.add(new ResourceBean(
|
||||||
copiedFile.getPublicLink(true),
|
externalUrl != null ? externalUrl : copiedFile.getPublicLink(true),
|
||||||
resource.getEditableName(),
|
resource.getEditableName(),
|
||||||
copiedFile.getDescription(),
|
copiedFile.getDescription(),
|
||||||
copiedFile.getId(),
|
copiedFile.getId(),
|
||||||
|
|
Loading…
Reference in New Issue