Class SocialUtils


  • public class SocialUtils
    extends Object
    Utility class.
    • Constructor Detail

      • SocialUtils

        public SocialUtils()
    • Method Detail

      • shareApplicationUpdate

        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)
        Method used when an application needs to publish something.
        Parameters:
        feedText -
        uriParams -
        previewTitle -
        previewDescription -
        httpImageUrl -
        Returns:
        true upon success, false on failure
      • getProfileFromInfrastrucure

        public 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
        Parameters:
        idApp - as identifier of your application (as reported in the ApplicationProfile)
        scopeApp - the scope of the application
      • shareUserUpdate

        public 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.
        Parameters:
        userId -
        postText -
        vreId -
        previewTitle -
        previewDescription -
        previewHost -
        previewUrl -
        urlThumbnail -
        notifyGroup -
        Returns:
        The written Feed