Class SocialCommunications
- java.lang.Object
-
- org.gcube.datacatalogue.grsf_manage_widget.server.manage.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)
-
-
Field Summary
Fields Modifier and Type Field Description static StringUSER_PROFILE_OID
-
Constructor Summary
Constructors Constructor Description SocialCommunications()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetBaseUrlSocialService(javax.servlet.http.HttpServletRequest httpServletRequest)static StringgetEncodedUrlManage(RevertableOperations operation, String administrator, long timestamp, String uuid, String clientCurrenturl)Create the url to be send for reverting the operationstatic Map<String,Object>getResponseEntityAsJSON(org.apache.http.HttpResponse response)Convert the json response to a mapstatic voidsendEmailAdministrators(String serviceUrl, ManageProductBean bean, org.gcube.datacatalogue.utillibrary.server.DataCatalogue catalogue, String username, String fullName, long groupId, String clientCurrenturl, boolean isMergeInvolved)Send an email to the administrator as well as thestatic voidsendEmailAdministratorsOnOperationReverted(String serviceUrl, RevertableOperationInfo rInfo, long groupId)static voidwritePostOnRevert(String serviceUrl, RevertableOperationInfo rInfo, boolean enablePostNotification, String userCurrentUrl)Notify the users about the required changes.static voidwriteProductPost(String serviceUrl, ManageProductBean bean, String username, String fullName, boolean enablePostNotification, String userCurrentUrl)Notify the users about the required changes.
-
-
-
Field Detail
-
USER_PROFILE_OID
public static final String USER_PROFILE_OID
- See Also:
- Constant Field Values
-
-
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:
ExceptioException
-
sendEmailAdministratorsOnOperationReverted
public static void sendEmailAdministratorsOnOperationReverted(String serviceUrl, RevertableOperationInfo rInfo, long groupId) throws Exception
- Throws:
Exception
-
getEncodedUrlManage
public static String getEncodedUrlManage(RevertableOperations operation, String administrator, long timestamp, String uuid, String clientCurrenturl) throws Exception
Create the url to be send for reverting the operation- Parameters:
httpSession-- Returns:
- Throws:
Exception
-
-