com.openexchange.mail.json.writer
Class JSONObjectConverter

java.lang.Object
  extended by com.openexchange.mail.json.writer.JSONObjectConverter

public final class JSONObjectConverter
extends java.lang.Object

JSONObjectConverter - Converts a raw JSON mail representation into a user-sensitive JSON mail representation.

Author:
Thorben Betten

Constructor Summary
JSONObjectConverter(org.json.JSONObject rawJSONMailObject, DisplayMode displayMode, com.openexchange.session.Session session, UserSettingMail usm, com.openexchange.groupware.contexts.Context ctx)
          Initializes a new JSONObjectConverter.
 
Method Summary
 org.json.JSONObject raw2Json()
          Converts this converter's raw JSON mail representation into a user-sensitive JSON mail representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONObjectConverter

public JSONObjectConverter(org.json.JSONObject rawJSONMailObject,
                           DisplayMode displayMode,
                           com.openexchange.session.Session session,
                           UserSettingMail usm,
                           com.openexchange.groupware.contexts.Context ctx)
                    throws MailException
Initializes a new JSONObjectConverter.

Parameters:
rawJSONMailObject - The raw JSON mail representation to convert
displayMode - The request-specific display mode
session - The session providing needed user information
usm - The (possibly request-specific) mail settings
ctx - The context
Throws:
MailException - If initialization fails
Method Detail

raw2Json

public org.json.JSONObject raw2Json()
                             throws MailException
Converts this converter's raw JSON mail representation into a user-sensitive JSON mail representation.

Returns:
The user-sensitive JSON mail representation
Throws:
MailException - If conversion fails