45 lines
1.2 KiB
Java
45 lines
1.2 KiB
Java
package org.gcube.portlets.widgets.ckan2zenodopublisher.client;
|
|
|
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.CatalogueItem;
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
public interface CkanToZenodoPublisherServiceAsync
|
|
{
|
|
|
|
/**
|
|
* GWT-RPC service asynchronous (client-side) interface
|
|
* @see org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZenodoPublisherService
|
|
*/
|
|
void greetServer( java.lang.String name, AsyncCallback<java.lang.String> callback );
|
|
|
|
|
|
/**
|
|
* Utility class to get the RPC Async interface from client-side code
|
|
*/
|
|
public static final class Util
|
|
{
|
|
private static CkanToZenodoPublisherServiceAsync instance;
|
|
|
|
public static final CkanToZenodoPublisherServiceAsync getInstance()
|
|
{
|
|
if ( instance == null )
|
|
{
|
|
instance = (CkanToZenodoPublisherServiceAsync) GWT.create( CkanToZenodoPublisherService.class );
|
|
}
|
|
return instance;
|
|
}
|
|
|
|
private Util()
|
|
{
|
|
// Utility class should not be instantiated
|
|
}
|
|
}
|
|
|
|
|
|
void publishOnZenodo(CatalogueItem item, AsyncCallback<String> callback);
|
|
|
|
|
|
}
|