Class NotificationUtils


  • public class NotificationUtils
    extends Object
    • Constructor Detail

      • NotificationUtils

        public NotificationUtils()
    • Method Detail

      • getLocale

        public static Locale getLocale​(String language)
        Get locale by user's language
        Parameters:
        language - the language of target user
        Returns:
      • getDigest

        public static DigestTemplate getDigest​(org.exoplatform.commons.api.notification.plugin.config.PluginConfig templateConfig,
                                               String pluginId,
                                               String language)
        Gets the digest's resource bundle
        Parameters:
        templateConfig -
        pluginId -
        language -
        Returns:
      • getSubject

        public static org.exoplatform.commons.api.notification.template.Element getSubject​(org.exoplatform.commons.api.notification.plugin.config.PluginConfig templateConfig,
                                                                                           String pluginId,
                                                                                           String language)
        Gets the subject's resource bundle
        Parameters:
        templateConfig -
        pluginId -
        language -
        Returns:
      • getValueParam

        public static String getValueParam​(org.exoplatform.container.xml.InitParams params,
                                           String key,
                                           String defaultValue)
      • getValueParam

        public static int getValueParam​(org.exoplatform.container.xml.InitParams params,
                                        String key,
                                        int defaultValue)
      • getSystemValue

        public static String getSystemValue​(org.exoplatform.container.xml.InitParams params,
                                            String systemKey,
                                            String paramKey,
                                            String defaultValue)
      • getSystemValue

        public static int getSystemValue​(org.exoplatform.container.xml.InitParams params,
                                         String systemKey,
                                         String paramKey,
                                         int defaultValue)
      • isValidNotificationSenderName

        public static boolean isValidNotificationSenderName​(String name)
      • isValidEmailAddresses

        public static boolean isValidEmailAddresses​(String addressList)
      • isDeletedMember

        public static boolean isDeletedMember​(String userName)
      • isActiveSetting

        public static boolean isActiveSetting​(String userId)
      • processLinkTitle

        public static String processLinkTitle​(String title)
        Add the style css for a link in the activity title to display a link without underline
        Parameters:
        title - activity title
        Returns:
        activity title after process all link
      • getNotificationActivityTitle

        public static String getNotificationActivityTitle​(String title,
                                                          String activityType)
        Parameters:
        title -
        activityType -
        Returns:
      • removeLinkTitle

        public static String removeLinkTitle​(String title)
        Remove all link in activity title and add user-name class
        Parameters:
        title -
        Returns:
      • getProfileUrl

        public static String getProfileUrl​(String userId)
      • getPortalHome

        public static String getPortalHome​(String portalName)