|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.cache.JSONMessageCache
public final class JSONMessageCache
JSONMessageCache - A JSON message cache.
| Method Summary | |
|---|---|
void |
clear()
Clears this cache. |
boolean |
containsFolder(int accountId,
java.lang.String fullname,
int userId,
int cid)
Checks if a JSON mail object is associated with specified account ID, folder fullname and mail ID. |
boolean |
containsFolder(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
Checks if a JSON mail object is associated with specified account ID, folder fullname and mail ID. |
boolean |
containsKey(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
Checks if a JSON mail object is associated with specified account ID, folder fullname and mail ID. |
boolean |
containsKey(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
Checks if a JSON mail object is associated with specified account ID, folder fullname and mail ID. |
org.json.JSONObject |
get(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
Gets the cloned JSON mail object associated with specified account ID, folder fullname and mail ID. |
org.json.JSONObject |
get(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
Gets the cloned JSON mail object associated with specified account ID, folder fullname and mail ID. |
static JSONMessageCache |
getInstance()
Gets the cache instance. |
static void |
initInstance()
Initializes the cache instance. |
void |
put(int accountId,
java.lang.String fullname,
java.lang.String id,
java.util.concurrent.FutureTask<org.json.JSONObject> jsonMailObject,
int userId,
int cid)
Associates given JSON mail object with specified account ID, folder fullname and mail ID. |
void |
put(int accountId,
java.lang.String fullname,
java.lang.String id,
java.util.concurrent.FutureTask<org.json.JSONObject> jsonMailObject,
com.openexchange.session.Session session)
Associates given JSON mail object with specified account ID, folder fullname and mail ID. |
static void |
releaseInstance()
Releases the cache instance. |
org.json.JSONObject |
remove(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
Removes the JSON mail object associated with specified account ID, folder fullname and mail ID. |
org.json.JSONObject |
remove(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
Removes the JSON mail object associated with specified account ID, folder fullname and mail ID. |
void |
removeAllFoldersExcept(int accountId,
java.lang.String fullname,
int userId,
int cid)
Removes all JSON mail objects except the ones associated with specified account ID and folder fullname. |
void |
removeAllFoldersExcept(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
Removes all JSON mail objects except the ones associated with specified account ID and folder fullname. |
void |
removeFolder(int accountId,
java.lang.String fullname,
int userId,
int cid)
Removes all JSON mail objects associated with specified account ID and folder fullname. |
void |
removeFolder(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
Removes all JSON mail objects associated with specified account ID and folder fullname. |
void |
removeUser(int userId,
int cid)
Removes all JSON mail objects associated with specified user ID and context ID. |
void |
removeUser(com.openexchange.session.Session session)
Removes all JSON mail objects associated with specified user ID and context ID. |
void |
switchSeenFlag(int accountId,
java.lang.String fullname,
boolean seen,
int unread,
int userId,
int cid)
Switch the \Seen flag for specified mails' JSON representations. |
void |
switchSeenFlag(int accountId,
java.lang.String fullname,
boolean seen,
int unread,
com.openexchange.session.Session session)
Switch the \Seen flag for specified mails' JSON representations. |
void |
switchSeenFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
boolean seen,
int unread,
int userId,
int cid)
Switch the \Seen flag for specified mails' JSON representations. |
void |
switchSeenFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
boolean seen,
int unread,
com.openexchange.session.Session session)
Switch the \Seen flag for specified mails' JSON representations. |
void |
updateColorFlag(int accountId,
java.lang.String fullname,
int colorFlag,
int userId,
int cid)
Updates the color flag for specified mails' JSON representations. |
void |
updateColorFlag(int accountId,
java.lang.String fullname,
int colorFlag,
com.openexchange.session.Session session)
Updates the color flag for specified mails' JSON representations. |
void |
updateColorFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int colorFlag,
int userId,
int cid)
Updates the color flag for specified mails' JSON representations. |
void |
updateColorFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int colorFlag,
com.openexchange.session.Session session)
Updates the color flag for specified mails' JSON representations. |
void |
updateFlags(int accountId,
java.lang.String fullname,
int newFlags,
boolean set,
int userId,
int cid)
Updates flags for specified mails' JSON representations. |
void |
updateFlags(int accountId,
java.lang.String fullname,
int newFlags,
boolean set,
com.openexchange.session.Session session)
Updates flags for specified mails' JSON representations. |
void |
updateFlags(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int newFlags,
boolean set,
int userId,
int cid)
Updates flags for specified mails' JSON representations. |
void |
updateFlags(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int newFlags,
boolean set,
com.openexchange.session.Session session)
Updates flags for specified mails' JSON representations. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JSONMessageCache getInstance()
null
public static void initInstance()
throws MailException
MailException - If initialization failspublic static void releaseInstance()
public void put(int accountId,
java.lang.String fullname,
java.lang.String id,
java.util.concurrent.FutureTask<org.json.JSONObject> jsonMailObject,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDjsonMailObject - The JSON mail objectsession - The session providing user and context information
MailException - If put fails
public void put(int accountId,
java.lang.String fullname,
java.lang.String id,
java.util.concurrent.FutureTask<org.json.JSONObject> jsonMailObject,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDjsonMailObject - The JSON mail objectuserId - The user IDcid - The context ID
MailException - If put fails
public boolean containsKey(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
accountId - The account IDfullname - The folder fullnameid - The mail IDsession - The session providing user and context information
true If this cache contains a mapping for given key; otherwise false
public boolean containsKey(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
accountId - The account IDfullname - The folder fullnameid - The mail IDuserId - The user IDcid - The context ID
true If this cache contains a mapping for given key; otherwise false
public boolean containsFolder(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
accountId - The account IDfullname - The folder fullnameid - The mail IDsession - The session providing user and context information
true If this cache contains a mapping for given key; otherwise false
public boolean containsFolder(int accountId,
java.lang.String fullname,
int userId,
int cid)
accountId - The account IDfullname - The folder fullnameid - The mail IDuserId - The user IDcid - The context ID
true If this cache contains a mapping for given key; otherwise false
public org.json.JSONObject get(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDsession - The session providing user and context information
null
MailException - If JSON mail object cannot be returned
public org.json.JSONObject get(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDuserId - The user IDcid - The context ID
null
MailException - If JSON mail object cannot be returned
public void switchSeenFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
boolean seen,
int unread,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnameid - The mail IDseen - true to set \Seen flag; otherwise falseunread - The unread countsession - The session providing user and context information
MailException - If an error occurs
public void switchSeenFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
boolean seen,
int unread,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnameid - The mail IDseen - true to set \Seen flag; otherwise falseunread - The unread count for specified folderuserId - The user IDcid - The context ID
MailException - If an error occurs
public void switchSeenFlag(int accountId,
java.lang.String fullname,
boolean seen,
int unread,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnameseen - true to set \Seen flag; otherwise falseunread - The unread countsession - The session providing user and context information
MailException - If an error occurs
public void switchSeenFlag(int accountId,
java.lang.String fullname,
boolean seen,
int unread,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnameseen - true to set \Seen flag; otherwise falseunread - The unread count for specified folderuserId - The user IDcid - The context ID
MailException - If an error occurs
public void updateFlags(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int newFlags,
boolean set,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnameid - The mail IDflags - The flags bit maskset - true to set; otherwise falsesession - The session providing user and context information
MailException - If an error occurs
public void updateFlags(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int newFlags,
boolean set,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnameid - The mail IDflags - The flags bit maskset - true to set; otherwise falseuserId - The user IDcid - The context ID
MailException - If an error occurs
public void updateFlags(int accountId,
java.lang.String fullname,
int newFlags,
boolean set,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnameflags - The flags bit maskset - true to set; otherwise falsesession - The session providing user and context information
MailException - If an error occurs
public void updateFlags(int accountId,
java.lang.String fullname,
int newFlags,
boolean set,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnameflags - The flags bit maskset - true to set; otherwise falseuserId - The user IDcid - The context ID
MailException - If an error occurs
public void updateColorFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int colorFlag,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnameids - The mail IDscolorFlag - The color flag to setsession - The session providing user and context information
MailException - If an error occurs
public void updateColorFlag(int accountId,
java.lang.String fullname,
java.lang.String[] ids,
int colorFlag,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnameids - The mail IDscolorFlag - The color flag to setuserId - The user IDcid - The context ID
MailException - If an error occurs
public void updateColorFlag(int accountId,
java.lang.String fullname,
int colorFlag,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The fullnamecolorFlag - The color flag to setsession - The session providing user and context information
MailException - If an error occurs
public void updateColorFlag(int accountId,
java.lang.String fullname,
int colorFlag,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The fullnamecolorFlag - The color flag to setuserId - The user IDcid - The context ID
MailException - If an error occurs
public org.json.JSONObject remove(int accountId,
java.lang.String fullname,
java.lang.String id,
com.openexchange.session.Session session)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDsession - The session providing user and context information
null
MailException - If JSON mail object cannot be removed
public org.json.JSONObject remove(int accountId,
java.lang.String fullname,
java.lang.String id,
int userId,
int cid)
throws MailException
accountId - The account IDfullname - The folder fullnameid - The mail IDuserId - The user IDcid - The context ID
null
MailException - If JSON mail object cannot be removed
public void removeFolder(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
accountId - The account IDfullname - The folder fullnamesession - The session providing user and context information
public void removeFolder(int accountId,
java.lang.String fullname,
int userId,
int cid)
accountId - The account IDfullname - The folder fullnameuserId - The user IDcid - The context ID
public void removeAllFoldersExcept(int accountId,
java.lang.String fullname,
com.openexchange.session.Session session)
accountId - The account IDfullname - The fullname of the folder whose mails shall be keptsession - The session providing user and context information
public void removeAllFoldersExcept(int accountId,
java.lang.String fullname,
int userId,
int cid)
accountId - The account IDfullname - The fullname of the folder whose mails shall be keptuserId - The user IDcid - The context IDpublic void removeUser(com.openexchange.session.Session session)
session - The session providing user and context information
public void removeUser(int userId,
int cid)
userId - The user IDcid - The context IDpublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||