SocialMailingUtil (Social Portal ASL Extension 1.4.0-4.12.0-169465 API)
Date: 2018-07-18

org.gcube.applicationsupportlayer.social.mailing

## Class SocialMailingUtil

- java.lang.Object
- - org.gcube.applicationsupportlayer.social.mailing.SocialMailingUtil

-     public class SocialMailingUtil
      extends Object

  Author:
    Massimiliano Assante, ISTI-CNR, Costantino Perciante, ISTI-CNR

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `WRITE_ABOVE_MESSAGE_REPLY`
    `static String` | `WRITE_ABOVE_TO_REPLY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocialMailingUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static String` | `buildHtmlDiscussion(org.gcube.portal.databook.shared.Notification notification2Save, org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Comment> comments, String commentKey)` Build up a discussion given the feed and its comments.
    `protected static String` | `buildPlainTextDiscussion(org.gcube.portal.databook.shared.Notification notification2Save, org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Comment> comments, String commentKey)` Build a plain text discussion given a feed and its comments.
    `protected static String` | `convertHTML2Text(String html)` Convert html into simple text
    `protected static String` | `getHTMLEmail(String vreName, org.gcube.portal.databook.shared.Notification notification2Save, String userFirstName, String portalURL, String siteLandingPagePath, String email, org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Comment> comments, String commentKey, String... hashtags)`
    `protected static String` | `getSubjectByNotificationType(org.gcube.portal.databook.shared.Notification notification2Save, String vreName, String userFirstName, Set<String> mentionedVReGroups, String... optionalParams)` construct the subjec of the email
    `protected static String` | `getTextEmail(org.gcube.portal.databook.shared.Notification notification2Save, String userFirstName, String portalURL, String siteLandingPagePath, String email, org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Comment> comments, String commentKey, String[] hashtags)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### WRITE_ABOVE_MESSAGE_REPLY

          public static final String WRITE_ABOVE_MESSAGE_REPLY

      See Also:
        Constant Field Values

    - #### WRITE_ABOVE_TO_REPLY

          public static final String WRITE_ABOVE_TO_REPLY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SocialMailingUtil

          public SocialMailingUtil()

  - ### Method Detail

    - #### getHTMLEmail

          protected static String getHTMLEmail(String vreName,
                                               org.gcube.portal.databook.shared.Notification notification2Save,
                                               String userFirstName,
                                               String portalURL,
                                               String siteLandingPagePath,
                                               String email,
                                               org.gcube.portal.databook.shared.Feed feed,
                                               List<org.gcube.portal.databook.shared.Comment> comments,
                                               String commentKey,
                                               String... hashtags)

      Parameters:
        `notification2Save` -
        `userFirstName` -
        `portalURL` -
        `siteLandingPagePath` -
        `email` -
        `vreName` -
        `feed` -
        `comments` -
        `commentKey` -
        `hashtags` -
      Returns:

    - #### getTextEmail

          protected static String getTextEmail(org.gcube.portal.databook.shared.Notification notification2Save,
                                               String userFirstName,
                                               String portalURL,
                                               String siteLandingPagePath,
                                               String email,
                                               org.gcube.portal.databook.shared.Feed feed,
                                               List<org.gcube.portal.databook.shared.Comment> comments,
                                               String commentKey,
                                               String[] hashtags)

      Parameters:
        `notification2Save` -
        `userFirstName` -
        `portalURL` -
        `siteLandingPagePath` -
        `email` -
        `feed` -
        `comments` -
        `commentKey` -
        `hashtags` -
      Returns:

    - #### getSubjectByNotificationType

          protected static String getSubjectByNotificationType(org.gcube.portal.databook.shared.Notification notification2Save,
                                                               String vreName,
                                                               String userFirstName,
                                                               Set<String> mentionedVReGroups,
                                                               String... optionalParams)

      construct the subjec of the email
      Parameters:
        `notification2Save` -
        `portalURL` -
        `vreName` -
      Returns:

    - #### convertHTML2Text

          protected static String convertHTML2Text(String html)

      Convert html into simple text

    - #### buildHtmlDiscussion

          protected static String buildHtmlDiscussion(org.gcube.portal.databook.shared.Notification notification2Save,
                                                      org.gcube.portal.databook.shared.Feed feed,
                                                      List<org.gcube.portal.databook.shared.Comment> comments,
                                                      String commentKey)

      Build up a discussion given the feed and its comments.
      Parameters:
        `notification2Save` -
        `feed` -
        `comments` -
        `commentKey` - if not null, when building the discussion stop at this comment.
      Returns:
        an html string representing the discussion

    - #### buildPlainTextDiscussion

          protected static String buildPlainTextDiscussion(org.gcube.portal.databook.shared.Notification notification2Save,
                                                           org.gcube.portal.databook.shared.Feed feed,
                                                           List<org.gcube.portal.databook.shared.Comment> comments,
                                                           String commentKey)

      Build a plain text discussion given a feed and its comments.
      Parameters:
        `feed` -
        `comments` -
        `commentKey` - if not null, when building the discussion stop at this comment.
      Returns:
        a string representing the discussion

Copyright © 2018. All Rights Reserved.