Interface CKanPublisherService

  • All Superinterfaces:
    com.google.gwt.user.client.rpc.RemoteService
    All Known Implementing Classes:
    CKANPublisherServicesImpl

    @RemoteServiceRelativePath("ckanservices")
    public interface CKanPublisherService
    extends com.google.gwt.user.client.rpc.RemoteService
    CKAN publisher services.
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Method Detail

      • getLicenses

        List<LicenseBean> getLicenses()
        Retrieve the list of licenses to show to the user.
        Returns:
        a LicenseBean on success, null on error.
      • getDatasetBean

        DatasetBean getDatasetBean​(String folderIdOrFileId)
                            throws Exception
        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
        Returns:
        Throws:
        Exception
      • createCKanDataset

        DatasetBean createCKanDataset​(DatasetBean toCreate)
                               throws Exception
        Try to create such dataset starting from the information contained into the toCreate bean.
        Parameters:
        toCreate -
        Returns:
        the sent bean filled with the needed information
        Throws:
        Exception
      • deleteResourceFromDataset

        boolean deleteResourceFromDataset​(ResourceElementBean resource)
                                   throws Exception
        Delete this resource from the dataset with id datasetId
        Parameters:
        resource -
        datasetId -
        Returns:
        true on success, false otherwise
        Throws:
        Exception
      • datasetIdAlreadyExists

        boolean datasetIdAlreadyExists​(String title,
                                       String orgName)
                                throws Exception
        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 -
        Returns:
        true if it exists, false otherwise
        Throws:
        Exception
      • getUserGroups

        List<OrganizationBean> getUserGroups​(String orgName)
        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.
        Returns:
        a list of groups' beans
      • isPublisherUser

        boolean isPublisherUser​(boolean isWorkspaceRequest)
                         throws Exception
        The method checks if the user is a publisher or he/she doesn't have the rights to publish
        Returns:
        true if he/she can publish, false otherwise
        Throws:
        Exception
      • getTagsForOrganization

        List<String> getTagsForOrganization​(String orgName)
                                     throws Exception
        Get the list of vocabulary tags for this scope
        Parameters:
        orgName -
        Returns:
        Throws:
        Exception
      • isGeoJSONValid

        boolean isGeoJSONValid​(String json)
                        throws Exception
        Validate a geo json field
        Parameters:
        json -
        Returns:
        Throws:
        Exception