public class DBStore
extends javax.mail.Store
Constructor and Description |
---|
DBStore(javax.mail.Session session,
javax.mail.URLName url) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commit() |
void |
connect() |
void |
connect(java.lang.String host,
java.lang.String user,
java.lang.String password) |
JDCConnection |
getConnection() |
DBFolder |
getDBFolder(java.lang.String sFolderName)
Same as getFolder() but casting result to DBFolder
|
javax.mail.Folder |
getDefaultFolder()
Get inbox Folder
|
javax.mail.Folder |
getFolder(java.lang.String sFolderName)
Get folder by guid or name
|
javax.mail.Folder |
getFolder(javax.mail.URLName oURL)
Calls getFolder(oURL.getFile());
|
javax.mail.Folder[] |
getPersonalNamespaces() |
javax.mail.Session |
getSession() |
javax.mail.Folder[] |
getSharedNamespaces() |
javax.mail.URLName |
getURLName() |
ACLUser |
getUser() |
javax.mail.Folder[] |
getUserNamespaces(java.lang.String sUserId) |
boolean |
isConnected() |
static java.lang.String |
MBoxDirectory(java.lang.String sProfile,
int iDomainId,
java.lang.String sWorkAreaGu) |
static DBStore |
open(javax.mail.Session oMailSession,
java.lang.String sProfile,
java.lang.String sMBoxDir,
java.lang.String sGuUser,
java.lang.String sPwd)
Create new DBStore instance and open connection to the database
|
DBFolder |
openDBFolder(java.lang.String sFolderName,
int iMode)
Get DBFolder and open it in the specified mode
|
DBMimeMessage |
preFetchMessage(javax.mail.Folder oIncomingFldr,
int iMsgNum)
Fetch a message from remote folder into local cache
|
DBMimeMessage |
preFetchMessage(javax.mail.Folder oIncomingFldr,
java.lang.String sMsgId)
Fetch a message from remote folder into local cache
|
addFolderListener, addStoreListener, removeFolderListener, removeStoreListener
public DBStore(javax.mail.Session session, javax.mail.URLName url) throws javax.mail.MessagingException
javax.mail.MessagingException
public static DBStore open(javax.mail.Session oMailSession, java.lang.String sProfile, java.lang.String sMBoxDir, java.lang.String sGuUser, java.lang.String sPwd) throws javax.mail.MessagingException
oMailSession
- SessionsProfile
- StringsMBoxDir
- StringsGuUser
- StringsPwd
- Stringjavax.mail.MessagingException
public JDCConnection getConnection() throws java.sql.SQLException, javax.mail.MessagingException
java.sql.SQLException
javax.mail.MessagingException
public javax.mail.Session getSession()
public boolean isConnected()
isConnected
in class javax.mail.Service
public void connect(java.lang.String host, java.lang.String user, java.lang.String password) throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public void commit() throws javax.mail.MessagingException
javax.mail.MessagingException
public void connect() throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public void close() throws javax.mail.MessagingException
close
in class javax.mail.Service
javax.mail.MessagingException
public javax.mail.Folder getFolder(javax.mail.URLName oURL) throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
getFolder
in class javax.mail.Store
oURL
- URLNamejavax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public javax.mail.Folder getFolder(java.lang.String sFolderName) throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
Get folder by guid or name
getFolder
in class javax.mail.Store
sFolderName
- String This parameter may be either the folder GUID or its name
valid folder names are {inbox, outbox, drafts, sent, spam, deleted, received}javax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public DBFolder getDBFolder(java.lang.String sFolderName) throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
sFolderName
- Stringjavax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public DBFolder openDBFolder(java.lang.String sFolderName, int iMode) throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
sFolderName
- StringiMode
- int {DBFolder.READ_ONLY | DBFolder.READ_WRITE}javax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public javax.mail.Folder getDefaultFolder() throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
getDefaultFolder
in class javax.mail.Store
javax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public javax.mail.Folder[] getPersonalNamespaces() throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
getPersonalNamespaces
in class javax.mail.Store
javax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public javax.mail.Folder[] getSharedNamespaces()
getSharedNamespaces
in class javax.mail.Store
public javax.mail.Folder[] getUserNamespaces(java.lang.String sUserId) throws javax.mail.StoreClosedException, javax.mail.FolderNotFoundException, javax.mail.MessagingException
getUserNamespaces
in class javax.mail.Store
javax.mail.StoreClosedException
javax.mail.FolderNotFoundException
javax.mail.MessagingException
public javax.mail.URLName getURLName()
getURLName
in class javax.mail.Service
public ACLUser getUser()
public DBMimeMessage preFetchMessage(javax.mail.Folder oIncomingFldr, int iMsgNum) throws javax.mail.MessagingException, java.lang.ArrayIndexOutOfBoundsException
oIncomingFldr
- Incoming Folder (POP3, IMAP, or other)iMsgNum
- int Message numberjavax.mail.MessagingException
java.lang.ArrayIndexOutOfBoundsException
public DBMimeMessage preFetchMessage(javax.mail.Folder oIncomingFldr, java.lang.String sMsgId) throws javax.mail.MessagingException, java.lang.ArrayIndexOutOfBoundsException
oIncomingFldr
- Incoming Folder (POP3, IMAP, or other)sMsgId
- String Message Id.javax.mail.MessagingException
java.lang.ArrayIndexOutOfBoundsException
public static java.lang.String MBoxDirectory(java.lang.String sProfile, int iDomainId, java.lang.String sWorkAreaGu) throws java.net.ProtocolException
java.net.ProtocolException