added getDataCatalogue method

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@132953 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-10-08 20:16:31 +00:00
parent 11ab8b15eb
commit b06538e94f
1 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,8 @@
package org.gcube.data_catalogue.grsf_publish_ws.utils;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogueFactory;
/**
* Helper methods
@ -7,6 +10,11 @@ package org.gcube.data_catalogue.grsf_publish_ws.utils;
*/
public abstract class HelperMethods {
/**
* Convert a group name to its id on ckan
* @param origName
* @return
*/
public static String getGroupNameOnCkan(String origName){
if(origName == null)
@ -16,4 +24,15 @@ public abstract class HelperMethods {
}
/**
* Retrieve the running instance of the data catalogue for this scope
* @return
* @throws Exception
*/
public static DataCatalogue getDataCatalogueRunningInstance(String scope) throws Exception{
return DataCatalogueFactory.getFactory().getUtilsPerScope(scope);
}
}