Updated EvenHandler
This commit is contained in:
parent
f01c34728a
commit
9ea38de8cd
|
@ -4,6 +4,9 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="ckan2zenodo-publisher-widget-0.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan2zenodo-publisher-widget/ckan2zenodo-publisher-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
||||
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</wb-module>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -14,7 +14,7 @@
|
|||
<groupId>org.gcube.portlets.gcubeckan</groupId>
|
||||
<artifactId>gcube-ckan-datacatalog</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.8.0</version>
|
||||
<version>1.8.0-SNAPSHOT</version>
|
||||
<name>gCube CKAN Data Catalog</name>
|
||||
<description>The gCube CKAN Data Catalog portlet</description>
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>ckan2zenodo-publisher-widget</artifactId>
|
||||
<version>[0.0.1,1.0.0-SNAPSHOT)</version>
|
||||
<version>[0.0.1-SNAPSHOT,1.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -261,10 +261,10 @@ public class CkanEventHandlerManager {
|
|||
@Override
|
||||
public void onPublishOnZenodo(PublishOnZenodoEvent publishOnZenodoEvent) {
|
||||
|
||||
if(publishOnZenodoEvent.getUuidItem()!=null) {
|
||||
if(publishOnZenodoEvent.getItemId()!=null) {
|
||||
|
||||
CkanToZendoPublisherWidget publisherWidget = new CkanToZendoPublisherWidget();
|
||||
CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getUuidItem(), null, CatalogueItem.ITEM_TYPE.DATASET);
|
||||
CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getItemId(), null, null, CatalogueItem.ITEM_TYPE.DATASET);
|
||||
publisherWidget.publishOnZenodo(ci);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,24 +13,20 @@ import com.google.gwt.event.shared.GwtEvent;
|
|||
public class PublishOnZenodoEvent extends GwtEvent<PublishOnZenodoEventHandler>{
|
||||
|
||||
public static Type<PublishOnZenodoEventHandler> TYPE = new Type<PublishOnZenodoEventHandler>();
|
||||
private String uuidItem;
|
||||
private String itemId;
|
||||
|
||||
|
||||
/**
|
||||
* Instantiates a new insert metadata event.
|
||||
* Instantiates a new publish on zenodo event.
|
||||
*
|
||||
* @param uuidItem the uuid item
|
||||
* @param itemId the item id
|
||||
*/
|
||||
public PublishOnZenodoEvent(String uuidItem) {
|
||||
this.uuidItem = uuidItem;
|
||||
public PublishOnZenodoEvent(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the uuid item.
|
||||
*
|
||||
* @return the uuid item
|
||||
*/
|
||||
public String getUuidItem() {
|
||||
return uuidItem;
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Reference in New Issue