edu.washington.cs.supple.example.email
Class Backend
java.lang.Object
edu.washington.cs.supple.example.email.Backend
- All Implemented Interfaces:
- java.util.EventListener, java.beans.PropertyChangeListener
- public class Backend
- extends java.lang.Object
- implements java.beans.PropertyChangeListener
- Author:
- raphael
Backend operations for email client. This class comprises all
methods that manipulate, send or fetch data. The idea is that
our focus is on the functionality of the user interface, and
not on other functionality. This "other" functionality is
collected in this single class "Backend.java".
The Backend is used a singleton class. It provides references
to the current state of the four main window beans, and wrapper
methods for JavaMail functionality, and configuration file
load and save.
|
Field Summary |
static java.lang.String |
CONFIG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG
public static final java.lang.String CONFIG
- See Also:
- Constant Field Values
getInstance
public static Backend getInstance()
setBeans
public void setBeans(FoldersBean foldersBean,
MessagesBean messagesBean,
ConfigurationBean configurationBean,
StatusBarBean statusBarBean)
getFoldersBean
public FoldersBean getFoldersBean()
getMessagesBean
public MessagesBean getMessagesBean()
getConfigurationBean
public ConfigurationBean getConfigurationBean()
getStatusBarBean
public StatusBarBean getStatusBarBean()
displayStatus
public void displayStatus(java.lang.String status)
login
public void login()
throws java.lang.Exception
- Throws:
java.lang.Exception
sendMessage
public void sendMessage(MessageBean bean)
throws java.lang.Exception
- Throws:
java.lang.Exception
createBeanForNewMessage
public MessageBean createBeanForNewMessage()
throws java.lang.Exception
- Throws:
java.lang.Exception
createBeanForReplyMessage
public MessageBean createBeanForReplyMessage(MessageBean original)
throws java.lang.Exception
- Throws:
java.lang.Exception
createBeanForForwardMessage
public MessageBean createBeanForForwardMessage(MessageBean original)
throws java.lang.Exception
- Throws:
java.lang.Exception
createBeanForNewFolder
public FolderBean createBeanForNewFolder()
throws MessagingException
- Throws:
MessagingException
createBeanForFolder
public FolderBean createBeanForFolder(java.lang.String name)
deleteFolders
public void deleteFolders()
throws java.lang.Exception
- Throws:
java.lang.Exception
expungeMessages
public void expungeMessages()
throws java.lang.Exception
- Throws:
java.lang.Exception
copyMessagesToFolder
public void copyMessagesToFolder(FolderBean f)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadConfiguration
public void loadConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
saveConfiguration
public void saveConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange in interface java.beans.PropertyChangeListener