com.openexchange.mail.structure.parser
Class MIMEStructureParser

java.lang.Object
  extended by com.openexchange.mail.structure.parser.MIMEStructureParser

public final class MIMEStructureParser
extends java.lang.Object

MIMEStructureParser

Author:
Thorben Betten

Method Summary
 MailMessage parseStructure(org.json.JSONObject jsonStructure)
          Parses specified JSON mail structure to a MailMessage instance.
 ComposedMailMessage parseStructure(org.json.JSONObject jsonStructure, com.openexchange.session.Session session)
          Parses specified JSON mail structure to a transportable ComposedMailMessage instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseStructure

public MailMessage parseStructure(org.json.JSONObject jsonStructure)
                           throws MailException
Parses specified JSON mail structure to a MailMessage instance.

Parameters:
jsonStructure - The JSON mail structure
Returns:
The MailMessage instance
Throws:
MailException - If parsing fails

parseStructure

public ComposedMailMessage parseStructure(org.json.JSONObject jsonStructure,
                                          com.openexchange.session.Session session)
                                   throws MailException
Parses specified JSON mail structure to a transportable ComposedMailMessage instance.

Parameters:
jsonStructure - The JSON mail structure
session - The session
Returns:
The transportable ComposedMailMessage instance
Throws:
MailException - If parsing fails