| java.lang.Object net.wastl.webmail.xml.XMLGenericModel net.wastl.webmail.xml.XMLUserModel
XMLUserModel | public class XMLUserModel extends XMLGenericModel (Code) | | Mainly consists of a DOM that represents all of the data in the user's session.
On subtrees, there are the SYSDATA and the USERDATA DOM trees (among other stuff like folder list,
message list, etc)
Many methods here are synchronized but that shouldn't hurt performance too much since the cases where several
Threads access the model are rare anyway
author: Sebastian Schaffert |
Method Summary | |
public synchronized void | addMailhost(Element mh) Add a previously created Mailhost to the DOM. | public synchronized void | clearWork() | public synchronized Element | createFolder(String id, String name, boolean holds_folders, boolean holds_messages) | public synchronized Element | createMailhost(String name, String id, String url) | public synchronized Element | createMessageList() | protected synchronized Element | getCurrent(String type, String id) | public Element | getCurrentFolder(String id) | public Element | getCurrentMessage(String id) | public synchronized Element | getFolder(String id) | public synchronized XMLMessage | getMessage(Element folder, String msgnr, String msgid) | public synchronized Element | getMessageList(Element folder) Get messagelist for folder. | public synchronized XMLMessage | getWorkMessage() Return the WORK element that stores messages that are currently edited. | protected void | initRoot() | public synchronized boolean | messageCached(Element folder, String msgid) Check whether we already fetched this message. | public synchronized void | removeMessageList(Element folder) | protected synchronized Element | setCurrent(String type, String id) | public Element | setCurrentFolder(String id) | public Element | setCurrentMessage(String id) | public synchronized XMLMessage | setWorkMessage(XMLMessage message) Set the current work message (for forwarding and replying). | public synchronized void | update() |
addMailhost | public synchronized void addMailhost(Element mh)(Code) | | Add a previously created Mailhost to the DOM.
The Mailhost should already contain all the subfolders.:-)
|
clearWork | public synchronized void clearWork()(Code) | | |
createFolder | public synchronized Element createFolder(String id, String name, boolean holds_folders, boolean holds_messages)(Code) | | |
createMessageList | public synchronized Element createMessageList()(Code) | | |
getMessageList | public synchronized Element getMessageList(Element folder)(Code) | | Get messagelist for folder. Create if necessary.
|
getWorkMessage | public synchronized XMLMessage getWorkMessage()(Code) | | Return the WORK element that stores messages that are currently edited.
|
initRoot | protected void initRoot()(Code) | | |
messageCached | public synchronized boolean messageCached(Element folder, String msgid)(Code) | | Check whether we already fetched this message. This can save a lot of time and CPU.
|
removeMessageList | public synchronized void removeMessageList(Element folder)(Code) | | |
setWorkMessage | public synchronized XMLMessage setWorkMessage(XMLMessage message)(Code) | | Set the current work message (for forwarding and replying).
Note that this method uses importNode, therefore the newly
cloned message element is returned by this method.
|
update | public synchronized void update()(Code) | | |
|
|