info.magnolia.module.mail.util
Class MailUtil

java.lang.Object
  extended by info.magnolia.module.mail.util.MailUtil

public class MailUtil
extends Object

Provides static utility methods to work with emails in Magnolia.


Field Summary
static org.slf4j.Logger log
           
 
Constructor Summary
MailUtil()
           
 
Method Summary
static String convertEmailList(String mailTo)
          convert email address mapping
.
static Map<String,String> convertToMap(String parameters)
          Transforms a string name=value\r\nname=value..
static List<MailAttachment> createAttachmentList()
          Creates a list with the documents uploaded in the form.
static List<MailAttachment> createAttachmentList(Map parameters)
           
protected static Collection<info.magnolia.cms.core.Content> getAllUserNodes()
          Deprecated. use getAllUserNodes(UserManager manager) instead
protected static Collection<info.magnolia.cms.security.User> getAllUserNodes(info.magnolia.cms.security.UserManager manager)
           
protected static void getGroupMembersMails(info.magnolia.cms.security.UserManager manager, StringBuffer ret, String groupName)
           
static Object getParameter(Map<String,Object> param, String name, String defaultValue)
           
protected static String getUserMail(info.magnolia.cms.security.User user)
           
static void logMail(Map params, String loggerName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static org.slf4j.Logger log
Constructor Detail

MailUtil

public MailUtil()
Method Detail

convertToMap

public static Map<String,String> convertToMap(String parameters)
                                       throws IOException
Transforms a string name=value\r\nname=value.. into a hashmap

Throws:
IOException

createAttachmentList

public static List<MailAttachment> createAttachmentList()
Creates a list with the documents uploaded in the form.

Returns:

createAttachmentList

public static List<MailAttachment> createAttachmentList(Map parameters)

convertEmailList

public static String convertEmailList(String mailTo)
convert email address mapping
. user- will be replace by the email address of the user as stored in the user repository group- will


getGroupMembersMails

protected static void getGroupMembersMails(info.magnolia.cms.security.UserManager manager,
                                           StringBuffer ret,
                                           String groupName)

getAllUserNodes

@Deprecated
protected static Collection<info.magnolia.cms.core.Content> getAllUserNodes()
                                                                     throws javax.jcr.RepositoryException
Deprecated. use getAllUserNodes(UserManager manager) instead

Throws:
javax.jcr.RepositoryException

getAllUserNodes

protected static Collection<info.magnolia.cms.security.User> getAllUserNodes(info.magnolia.cms.security.UserManager manager)
                                                                      throws javax.jcr.RepositoryException
Returns:
Collection
Throws:
javax.jcr.RepositoryException

getUserMail

protected static String getUserMail(info.magnolia.cms.security.User user)

getParameter

public static Object getParameter(Map<String,Object> param,
                                  String name,
                                  String defaultValue)

logMail

public static void logMail(Map params,
                           String loggerName)


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.