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()
          TODO use UserManager.
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


getAllUserNodes

protected static Collection<info.magnolia.cms.core.Content> getAllUserNodes()
                                                                     throws javax.jcr.RepositoryException
TODO use UserManager. Will be fixed with MAGNOLIA-1947 / MAGNOLIA-1948

Returns:
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-2010 Magnolia International Ltd.. All Rights Reserved.