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.. into a hashmap
static List<MailAttachment> createAttachmentList()
          Creates a list with the documents uploaded in the form.
static List<MailAttachment> createAttachmentList(Map parameters)
           
protected static Collection<Content> getAllUserNodes()
          Deprecated. use getAllUserNodes(UserManager manager) instead
protected static Collection<User> getAllUserNodes(UserManager manager)
           
protected static void getGroupMembersMails(UserManager manager, StringBuffer ret, String groupName)
           
static Object getParameter(Map<String,Object> param, String name, String defaultValue)
           
protected static String getUserMail(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(UserManager manager,
                                           StringBuffer ret,
                                           String groupName)

getAllUserNodes

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

Throws:
javax.jcr.RepositoryException

getAllUserNodes

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

getUserMail

protected static String getUserMail(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–2014 Magnolia International Ltd.. All rights reserved.