Class SocialCommunications


  • public class SocialCommunications
    extends Object
    For managing the different interactions with social channels (posts and mails)
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Constructor Detail

      • SocialCommunications

        public SocialCommunications()
    • Method Detail

      • getBaseUrlSocialService

        public static String getBaseUrlSocialService​(javax.servlet.http.HttpServletRequest httpServletRequest)
        Parameters:
        httpServletRequest -
        context -
        Returns:
      • writePostOnRevert

        public static void writePostOnRevert​(String serviceUrl,
                                             RevertableOperationInfo rInfo,
                                             boolean enablePostNotification,
                                             String userCurrentUrl)
                                      throws Exception
        Notify the users about the required changes.
        Parameters:
        bean -
        url -
        username -
        fullName -
        hashtags -
        enablePostNotification -
        Throws:
        Exception
      • writeProductPost

        public static void writeProductPost​(String serviceUrl,
                                            ManageProductBean bean,
                                            String username,
                                            String fullName,
                                            boolean enablePostNotification,
                                            String userCurrentUrl)
                                     throws Exception
        Notify the users about the required changes.
        Parameters:
        bean -
        url -
        username -
        fullName -
        hashtags -
        enablePostNotification -
        Throws:
        Exception
      • sendEmailAdministrators

        public static void sendEmailAdministrators​(String serviceUrl,
                                                   ManageProductBean bean,
                                                   org.gcube.datacatalogue.utillibrary.server.DataCatalogue catalogue,
                                                   String username,
                                                   String fullName,
                                                   long groupId,
                                                   String clientCurrenturl,
                                                   boolean isMergeInvolved)
                                            throws Exception
        Send an email to the administrator as well as the
        Parameters:
        bean -
        catalogue -
        username -
        fullName -
        isMergeInvolved -
        httpSession -
        Throws:
        Exceptio
        Exception
      • getResponseEntityAsJSON

        public static Map<String,​Object> getResponseEntityAsJSON​(org.apache.http.HttpResponse response)
        Convert the json response to a map
        Parameters:
        response -
        Returns: