|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class provides interface for user store.
The user store is used by mail servers for storing a user-specific information, such as a mail session state, client software configuration, etc. Different servers use different methods, therefore only those may be implemented which are really required byt the current application setup.
Method Summary | |
void |
create(java.lang.String user)
Creates a user store for the given user. |
boolean |
exists(java.lang.String user)
Whether the given user's store exists. |
java.io.InputStream |
getAutoReply(java.lang.String user)
Returns an automatic reply message for the given user. |
java.lang.String[] |
getForwardAddress(java.lang.String user)
Returns a list of forward addresses associated with the given user. |
boolean |
hasSubscribed(java.lang.String user,
java.lang.String mailbox)
Whether the mailbox is subscribed for the given user. |
java.lang.String[] |
listUsers()
Returns a list of all users present in this mail store. |
Options |
readOptions(java.lang.String user)
Reads the webmail user options. |
void |
remove(java.lang.String user)
Removes the given user's store. |
void |
storeOptions(java.lang.String user,
Options options)
Stores the webmail user options. |
void |
subscribe(java.lang.String user,
java.lang.String mailbox)
Subscribes the mailbox for the given user. |
void |
unsubscribe(java.lang.String user,
java.lang.String mailbox)
Unsubscribes the mailbox for the given user. |
Method Detail |
public void create(java.lang.String user) throws MailException
user
- the user identification
MailException
- if an error occuredpublic boolean exists(java.lang.String user) throws MailException
This method must be always implemented.
user
- the user identification
MailException
- if an error occuredpublic void remove(java.lang.String user) throws MailException
This method must be always implemented.
user
- the user identification
MailException
- if an error occuredpublic java.lang.String[] listUsers() throws MailException
This method must be always implemented.
MailException
- if an error occuredpublic java.lang.String[] getForwardAddress(java.lang.String user) throws MailException
This method must be implemented for SMTPServer setup.
user
- the user identification
MailException
- if an error occuredpublic java.io.InputStream getAutoReply(java.lang.String user) throws java.io.IOException, MailException
This method must be implemented for SMTPServer setup.
user
- the user identification
java.io.IOException
- if an I/O error occured
MailException
- if an error occuredpublic boolean hasSubscribed(java.lang.String user, java.lang.String mailbox) throws MailException
This method must be implemented for IMAPServer setup.
user
- the user identificationmailbox
- the full mailbox name
MailException
- if an error occuredpublic void subscribe(java.lang.String user, java.lang.String mailbox) throws MailException
This method must be implemented for IMAPServer setup.
user
- the user identificationmailbox
- the full mailbox name
MailException
- if an error occuredpublic void unsubscribe(java.lang.String user, java.lang.String mailbox) throws MailException
This method must be implemented for IMAPServer setup.
user
- the user identificationmailbox
- the full mailbox name
MailException
- if an error occuredpublic Options readOptions(java.lang.String user) throws MailException
Returns null if there are no user options for the given user currently stored.
This method must be implemented for Webmail setup.
user
- the user identification
MailException
- if an error occuredpublic void storeOptions(java.lang.String user, Options options) throws MailException
This method must be implemented for Webmail setup.
user
- the user identificationoptions
- the user options
MailException
- if an error occured
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |