public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
getGcubeItemProperties(org.gcube.common.homelibrary.home.workspace.WorkspaceItem item)
Gets the gcube item properties.
|
static List<MetaDataProfileBean> |
getMetadataProfilesList(String scope,
javax.servlet.http.HttpSession httpSession,
org.gcube.application.framework.core.session.ASLSession aslSession)
Retrieve the list of metadata beans
|
static String |
getOrganizationNameFromScope(String scope)
Given the scope in the infrastructure the method retrieves the name of the ckan organization
|
static Map<String,Object> |
getResponseEntityAsJSON(org.apache.http.HttpResponse response)
Convert the json response to a map
|
static List<OrganizationBean> |
getUserOrganizationsListAdminEditor(String currentScope,
String username,
String groupName,
CKANPublisherServicesImpl ckanPublisherServicesImpl)
Retrieve the list of organizations in which the user has the admin/editor role
|
static String |
retrieveScopeFromOrganizationName(String organizationName)
Given a ckan organization name retrieve the infrastructure scope
|
static void |
writeProductPost(String productName,
String productUrl,
String userFullname,
List<String> hashtags,
boolean enablePostNotification)
Send notification to vre members about the created product by writing a post.
|
public static Map<String,String> getGcubeItemProperties(org.gcube.common.homelibrary.home.workspace.WorkspaceItem item)
item - the itempublic static List<OrganizationBean> getUserOrganizationsListAdminEditor(String currentScope, String username, String groupName, CKANPublisherServicesImpl ckanPublisherServicesImpl)
currentScope - the current scopeusername - the current usernamegroupName - the current groupNameckanPublisherServicesImpl - public static String retrieveScopeFromOrganizationName(String organizationName) throws Exception
organizationName - (prevre, devvre, ...)Exceptionpublic static String getOrganizationNameFromScope(String scope) throws Exception
Exceptionpublic static List<MetaDataProfileBean> getMetadataProfilesList(String scope, javax.servlet.http.HttpSession httpSession, org.gcube.application.framework.core.session.ASLSession aslSession)
public static void writeProductPost(String productName, String productUrl, String userFullname, List<String> hashtags, boolean enablePostNotification)
productName - the title of the productproductUrl - the url of the producthashtags - a list of product's hashtagsCopyright © 2016. All Rights Reserved.