Class EmailNotifier

    • Constructor Detail

      • EmailNotifier

        public EmailNotifier()
    • Method Detail

      • getEmailSubject

        protected java.lang.String getEmailSubject​(ActivityDocument.IActivity activity,
                                                   java.util.Locale locale)
                                            throws PortalException
        Generate an e-mail subject for the activity.

        The default implementation gets the localized STR_EMAIL_SUBJECT, and runs the EL evaluator to return the complete subject.
        Parameters:
        activity - The activity to use when creating the subject
        locale - The locale for string localization
        Returns:
        The subject for an email
        Throws:
        PortalException
        Since:
        8.2.0
      • getEmailBody

        protected java.lang.String getEmailBody​(ActivityDocument.IActivity activity,
                                                java.util.Locale locale)
                                         throws PortalException
        Generate an e-mail body for the activity.

        The default implementation gets the localized STR_EMAIL_HTML_BODY, and runs the EL evaluator to return the complete body HTML.
        Parameters:
        activity - The activity to use when creating the body
        locale - The locale for string localization
        Returns:
        A HTML for the e-mail body.
        Throws:
        PortalException
        Since:
        8.2.0
      • getLocaleForEmail

        protected java.util.Locale getLocaleForEmail​(ActivityDocument.IActivity activity)
                                              throws PortalException
        Returns the locale to localize the email
        Parameters:
        activity - the activity that will have the email generated
        Returns:
        a locale
        Throws:
        PortalException
        Since:
        8.2.0
      • getEmailDestinations

        protected java.util.Collection<IMailDestination> getEmailDestinations​(ActivityDocument.IActivity activity,
                                                                              java.util.Collection<UserConfig> users)
                                                                       throws PortalException
        Generate a list of email destinations to be added to an email of the activity.

        the default implementation adds all users that have an email to the list.
        Parameters:
        activity - the activity for the destination
        users - the list of users to add to the destination
        Returns:
        a list of email destinations
        Throws:
        PortalException
        Since:
        8.2.0