2016-05-26 18:12:53 +02:00
|
|
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.client;
|
|
|
|
|
2016-07-20 19:14:20 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.DatasetMetadataBean;
|
2016-05-26 18:12:53 +02:00
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.LicensesBean;
|
2016-07-20 19:14:20 +02:00
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.MetaDataProfileBean;
|
2016-06-14 12:35:10 +02:00
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.ResourceBeanWrapper;
|
2016-05-26 18:12:53 +02:00
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* CKAN publisher services.
|
|
|
|
* @author Costantino Perciante at ISTI-CNR
|
|
|
|
* (costantino.perciante@isti.cnr.it)
|
|
|
|
*/
|
|
|
|
@RemoteServiceRelativePath("ckanservices")
|
|
|
|
public interface CKanPublisherService extends RemoteService {
|
|
|
|
|
2016-06-06 17:24:52 +02:00
|
|
|
/**
|
|
|
|
* Retrieve the list of licenses to show to the user.
|
|
|
|
* @return a LicenseBean on success, <b>null</b> on error.
|
|
|
|
*/
|
2016-05-26 18:12:53 +02:00
|
|
|
LicensesBean getLicenses();
|
2016-06-06 17:24:52 +02:00
|
|
|
|
2016-07-20 19:14:20 +02:00
|
|
|
/**
|
|
|
|
* Retrieve the list of profiles for a given organization name .
|
|
|
|
* @return a List<MetaDataProfileBean> on success, <b>null</b> on error.
|
|
|
|
*/
|
|
|
|
List<MetaDataProfileBean> getProfiles(String orgName);
|
|
|
|
|
2016-06-06 17:24:52 +02:00
|
|
|
/**
|
|
|
|
* Retrieve a partially filled bean given a folder id and its owner.
|
|
|
|
* @param folderId
|
|
|
|
* @return @return a DatasetMetadataBean on success, <b>null</b> on error.
|
|
|
|
*/
|
2016-09-12 17:58:50 +02:00
|
|
|
DatasetMetadataBean getDatasetBean(String folderId);
|
2016-06-06 17:24:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Try to create such dataset starting from the information contained into the toCreate bean.
|
|
|
|
* @param toCreate
|
2016-06-10 12:10:18 +02:00
|
|
|
* @return the sent bean full filled with the needed information
|
2016-06-06 17:24:52 +02:00
|
|
|
*/
|
2016-09-15 14:56:35 +02:00
|
|
|
DatasetMetadataBean createCKanDataset(DatasetMetadataBean toCreate);
|
2016-06-07 17:50:33 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add this resource to the dataset whose id is datasetId
|
|
|
|
* @param resource
|
|
|
|
* @param datasetId
|
|
|
|
*/
|
2016-09-12 17:58:50 +02:00
|
|
|
ResourceBeanWrapper addResourceToDataset(ResourceBeanWrapper resource, String datasetId);
|
2016-06-08 18:31:54 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete this resource from the dataset with id datasetId
|
|
|
|
* @param resource
|
|
|
|
* @param datasetId
|
|
|
|
* @return <b>true</b> on success, false otherwise
|
|
|
|
*/
|
2016-09-12 17:58:50 +02:00
|
|
|
boolean deleteResourceFromDataset(ResourceBeanWrapper resource);
|
2016-05-26 18:12:53 +02:00
|
|
|
}
|