info.magnolia.module.mail.util
Class MailUtil

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

public class MailUtil
extends java.lang.Object

Provides static utility methods to work with emails in Magnolia.


Field Summary
static org.slf4j.Logger log
           
 
Constructor Summary
MailUtil()
           
 
Method Summary
static java.lang.String convertEmailList(java.lang.String mailTo)
          convert email address mapping
.
static java.util.Map<java.lang.String,java.lang.String> convertToMap(java.lang.String parameters)
          Transforms a string name=value\r\nname=value..
static java.util.List<MailAttachment> createAttachmentList()
          Creates a list with the documents uploaded in the form.
static java.util.List<MailAttachment> createAttachmentList(java.util.Map parameters)
           
protected static java.util.Collection<Content> getAllUserNodes()
          TODO use UserManager.
protected static void getGroupMembersMails(UserManager manager, java.lang.StringBuffer ret, java.lang.String groupName)
           
static java.lang.Object getParameter(java.util.Map<java.lang.String,java.lang.Object> param, java.lang.String name, java.lang.String defaultValue)
           
protected static java.lang.String getUserMail(User user)
           
static void logMail(java.util.Map params, java.lang.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 java.util.Map<java.lang.String,java.lang.String> convertToMap(java.lang.String parameters)
                                                                     throws java.io.IOException
Transforms a string name=value\r\nname=value.. into a hashmap

Throws:
java.io.IOException

createAttachmentList

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

Returns:

createAttachmentList

public static java.util.List<MailAttachment> createAttachmentList(java.util.Map parameters)

convertEmailList

public static java.lang.String convertEmailList(java.lang.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(UserManager manager,
                                           java.lang.StringBuffer ret,
                                           java.lang.String groupName)

getAllUserNodes

protected static java.util.Collection<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 java.lang.String getUserMail(User user)

getParameter

public static java.lang.Object getParameter(java.util.Map<java.lang.String,java.lang.Object> param,
                                            java.lang.String name,
                                            java.lang.String defaultValue)

logMail

public static void logMail(java.util.Map params,
                           java.lang.String loggerName)


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