public class Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NEWS_FEED_PORTLET_CLASSNAME |
static String |
NO_TEXT_FILE_SHARE |
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
filterCommentsPerContext(List<org.gcube.portal.databook.shared.Comment> comments,
String context)
Filter comments per context
|
static void |
filterFeedsPerContext(List<org.gcube.portal.databook.shared.Feed> feeds,
String context)
Given a list of not filtered feeds, the methods remove feeds unaccessible in this scope.
|
static void |
filterFeedsPerContextById(List<String> feedsIds,
String context)
Given a list of not filtered feeds, the methods remove feeds unaccessible in this scope.
|
static org.gcube.portal.databook.shared.ApplicationProfile |
getProfileFromInfrastrucure(String idApp,
String scopeApp)
This method looks up the applicationProfile profile among the ones available in the infrastructure
|
static boolean |
isApplicationToken(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is an application token
|
static boolean |
isContainerToken(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is a container token
|
static boolean |
isServiceToken(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is a service token
|
static boolean |
isUserToken(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is a user token
|
static boolean |
isUserTokenDefault(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is a user token (not qualified)
|
static boolean |
isUserTokenQualified(org.gcube.common.authorization.library.utils.Caller caller)
Check if it is a user token (qualified)
|
static org.gcube.portal.databook.shared.Feed |
shareApplicationUpdate(String postText,
String uriParams,
String previewTitle,
String previewDescription,
String httpImageUrl,
org.gcube.portal.databook.shared.ApplicationProfile applicationProfile,
org.gcube.common.authorization.library.utils.Caller caller,
boolean notifyGroup)
Method used when an application needs to publish something.
|
static org.gcube.portal.databook.shared.Feed |
shareUserUpdate(String userId,
String postText,
String vreId,
String previewTitle,
String previewDescription,
String previewHost,
String previewUrl,
String urlThumbnail,
boolean notifyGroup)
Allows user to post a feed in a certain vre.
|
public static final String NO_TEXT_FILE_SHARE
public static final String NEWS_FEED_PORTLET_CLASSNAME
public static org.gcube.portal.databook.shared.Feed shareApplicationUpdate(String postText, String uriParams, String previewTitle, String previewDescription, String httpImageUrl, org.gcube.portal.databook.shared.ApplicationProfile applicationProfile, org.gcube.common.authorization.library.utils.Caller caller, boolean notifyGroup)
feedText - uriParams - previewTitle - previewDescription - httpImageUrl - public static org.gcube.portal.databook.shared.ApplicationProfile getProfileFromInfrastrucure(String idApp, String scopeApp)
idApp - as identifier of your application (as reported in the ApplicationProfile)scopeApp - the scope of the applicationpublic static org.gcube.portal.databook.shared.Feed shareUserUpdate(String userId, String postText, String vreId, String previewTitle, String previewDescription, String previewHost, String previewUrl, String urlThumbnail, boolean notifyGroup)
userId - postText - vreId - previewTitle - previewDescription - previewHost - previewUrl - urlThumbnail - notifyGroup - public static void filterFeedsPerContextById(List<String> feedsIds, String context) throws Exception
feedsIds - context - Exceptionpublic static void filterFeedsPerContext(List<org.gcube.portal.databook.shared.Feed> feeds, String context) throws Exception
retrievedLikedFeeds - context - Exceptionpublic static void filterCommentsPerContext(List<org.gcube.portal.databook.shared.Comment> comments, String context) throws Exception
comments - context - Exceptionpublic static boolean isServiceToken(org.gcube.common.authorization.library.utils.Caller caller)
public static boolean isApplicationToken(org.gcube.common.authorization.library.utils.Caller caller)
public static boolean isContainerToken(org.gcube.common.authorization.library.utils.Caller caller)
public static boolean isUserToken(org.gcube.common.authorization.library.utils.Caller caller)
public static boolean isUserTokenDefault(org.gcube.common.authorization.library.utils.Caller caller)
public static boolean isUserTokenQualified(org.gcube.common.authorization.library.utils.Caller caller)
Copyright © 2017. All Rights Reserved.