Interface CKanPublisherServiceAsync


  • public interface CKanPublisherServiceAsync
    CKAN publisher services RPC.
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Method Detail

      • getLicenses

        void getLicenses​(com.google.gwt.user.client.rpc.AsyncCallback<List<org.gcube.portlets.widgets.mpformbuilder.shared.license.LicenseBean>> callback)
        Retrieve the list of licenses to show to the user.
        Parameters:
        callback - the callback
      • buildPartialDatasetBean

        void buildPartialDatasetBean​(String folderIdOrFileId,
                                     com.google.gwt.user.client.rpc.AsyncCallback<DatasetBean> callback)
        Retrieve a partially filled bean given a folder id/file id and its owner.
        Parameters:
        folderIdOrFileId - the id of the folder of file to publish
        callback - the callback
      • createCKanDataset

        void createCKanDataset​(DatasetBean toCreate,
                               com.google.gwt.user.client.rpc.AsyncCallback<DatasetBean> callback)
        Try to create such dataset starting from the information contained into the toCreate bean.
        Parameters:
        toCreate - the to create
        callback - the callback
      • addResourceToDataset

        void addResourceToDataset​(ResourceElementBean resource,
                                  String organizationName,
                                  String datasetId,
                                  com.google.gwt.user.client.rpc.AsyncCallback<ResourceElementBean> callback)
        Add this resource to the dataset whose id is datasetId.
        Parameters:
        resource - the resource
        organizationName - the organization name
        datasetId - the dataset id
        callback - the callback
      • deleteResourceFromDataset

        void deleteResourceFromDataset​(ResourceElementBean resource,
                                       com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
        Delete this resource from the dataset with id datasetId.
        Parameters:
        resource - the resource
        callback - the callback
      • getProfiles

        void getProfiles​(String orgName,
                         com.google.gwt.user.client.rpc.AsyncCallback<List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean>> callback)
        Retrieve the list of profiles for a given organization name .
        Parameters:
        orgName - the org name
        callback - the callback
      • datasetIdAlreadyExists

        void datasetIdAlreadyExists​(String title,
                                    String orgName,
                                    com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
        Given the title the user wants to give to the new product to create, a check is performed to understand if a dataset with the proposed title (and so the id generated at server side) already exists.
        Parameters:
        title - the title
        orgName - the org name
        callback - the callback
      • getUserGroups

        void getUserGroups​(String orgName,
                           com.google.gwt.user.client.rpc.AsyncCallback<List<OrganizationBean>> callback)
        Retrieve the list of groups the user can choose to associate this product with.
        Parameters:
        orgName - retrieve the groups in the context linked to this name. If null, returns the one in the current context.
        callback - the callback
      • isPublisherUser

        void isPublisherUser​(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
        Checks if is publisher user.
        Parameters:
        callback - the callback
      • getTagsForOrganization

        void getTagsForOrganization​(String orgName,
                                    com.google.gwt.user.client.rpc.AsyncCallback<List<String>> callback)
        Get the list of vocabulary tags for this scope.
        Parameters:
        orgName - the org name
        callback - the callback
      • isGeoJSONValid

        void isGeoJSONValid​(String json,
                            com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
        Validate a geo json field.
        Parameters:
        json - the json
        callback - the callback
      • isPublisherOwnerOrAdminUser

        void isPublisherOwnerOrAdminUser​(String datasetIdOrName,
                                         com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
        Checks if is owner or admin user.
        Parameters:
        datasetIdOrName - the dataset id or name
        callback - the callback
      • getDatasetBeanForUpdate

        void getDatasetBeanForUpdate​(String itemID,
                                     com.google.gwt.user.client.rpc.AsyncCallback<DatasetBean> callback)
        Gets the dataset bean.
        Parameters:
        itemID - the item ID
        callback - the callback
      • getProfileForUpdate

        void getProfileForUpdate​(String orgName,
                                 String datasetType,
                                 String datasedIdOrName,
                                 com.google.gwt.user.client.rpc.AsyncCallback<MetadataProfileBeanForUpdate> callaback)
        Gets the profile for update.
        Parameters:
        orgName - the org name
        datasetType - the dataset type
        datasedIdOrName - the datased id or name
        callaback - the callaback
      • updateCKANDataset

        void updateCKANDataset​(DatasetBean toUpdate,
                               com.google.gwt.user.client.rpc.AsyncCallback<DatasetBean> callaback)
        Update CKAN dataset.
        Parameters:
        toUpdate - the to update
        callaback - the callaback
      • getPublicLinkForFileItemId

        void getPublicLinkForFileItemId​(String itemId,
                                        boolean shortenUrl,
                                        com.google.gwt.user.client.rpc.AsyncCallback<String> callaback)
        Gets the public link for file item id.
        Parameters:
        itemId - the item id
        shortenUrl - the shorten url
        callaback - the callaback
      • getBasicDatasetBean

        void getBasicDatasetBean​(String datasetIdOrName,
                                 com.google.gwt.user.client.rpc.AsyncCallback<DatasetBean> callaback)
        Gets the basic dataset bean.
        Parameters:
        datasetIdOrName - the dataset id or name
        callaback - the callaback
      • deleteItem

        void deleteItem​(DatasetBean datasetBean,
                        com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callaback)
        Delete item.
        Parameters:
        datasetBean - the dataset bean
        callaback - the callaback