|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.Folder
com.knowgate.hipermail.DBFolder
A subclass of javax.mail.Folder providing storage for MimeMessages at database LONGVARBINARY columns and MBOX files.
Folders are also a subclass of com.knowgate.hipergate.Category
| Field Summary | |
static short |
ClassId
|
static int |
MODE_BLOB
|
static int |
MODE_MBOX
|
| Fields inherited from class javax.mail.Folder |
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
| Constructor Summary | |
protected |
DBFolder(javax.mail.Store oStor,
java.lang.String sName)
|
| Method Summary | |
java.lang.String |
appendMessage(javax.mail.internet.MimeMessage oMsg)
|
void |
appendMessages(javax.mail.Message[] msgs)
Append messages to this DBFolder |
void |
close(boolean expunge)
Close this folder |
java.lang.String |
copyMessage(DBMimeMessage oSrcMsg)
Copy a DBMimeMessage from another DBFolder to this DBFolder |
boolean |
create(int type)
This method is not implemented and will always raise UnsupportedOperationException |
boolean |
create(java.lang.String sFolderName)
Create DBFolder with given name under current user mailroot Category |
boolean |
delete(boolean recurse)
Wipe all messages and delete this folder |
boolean |
exists()
|
javax.mail.Message[] |
expunge()
Expunge deleted messages |
Category |
getCategory()
Get instance of com.knowgate.hipergate.Category object |
java.lang.String |
getCategoryGuid()
Get Category GUID |
protected JDCConnection |
getConnection()
|
java.lang.String |
getDirectoryPath()
Get path to directory containing files belonging to this folder |
java.io.File |
getFile()
Get MBOX file that holds messages for this DBFolder |
java.lang.String |
getFilePath()
Get full path to MBOX file containing mime messages |
javax.mail.Folder |
getFolder(java.lang.String name)
Get folder by name or GUID |
java.lang.String |
getFullName()
Get category subpath to directory holding MBOX files for this folder |
javax.mail.Message |
getMessage(int msgnum)
|
protected javax.mail.Message |
getMessage(java.lang.String sMsgId,
int IdType)
|
DBMimeMessage |
getMessageByGuid(java.lang.String sMsgGuid)
|
DBMimeMessage |
getMessageByID(java.lang.String sMsgGuid)
|
int |
getMessageCount()
|
java.util.Properties |
getMessageHeaders(java.lang.String sMsgId)
Get message GUID, Id, Number, Subject, From and Reply-To from k_mime_msgs table |
java.lang.String |
getName()
Get column nm_category from table k_categories for this folder |
javax.mail.Folder |
getParent()
|
javax.mail.Flags |
getPermanentFlags()
|
char |
getSeparator()
|
int |
getType()
|
javax.mail.URLName |
getURLName()
|
boolean |
hasNewMessages()
This method is not implemented and will always raise UnsupportedOperationException |
int |
importMbox(java.lang.String sMboxFilePath)
|
boolean |
isOpen()
|
DBKeySet |
keySet()
Get set of identifiers for messages at this folder |
javax.mail.Folder[] |
list(java.lang.String pattern)
|
void |
moveMessage(DBMimeMessage oSrcMsg)
Move a DBMimeMessage from another DBFolder to this DBFolder |
void |
open(int mode)
Open this DBFolder |
void |
reindexMbox()
Delete very message from th eindex and rebuild it by reading the default MBOX file for this folder |
void |
reindexMbox(java.lang.String sMboxFilePath)
Delete every message from the index and rebuild it by re-reading the specified MBOX file |
boolean |
renameTo(javax.mail.Folder f)
|
void |
wipe()
Delete all messages from this folder and clear MBOX file |
| Methods inherited from class javax.mail.Folder |
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, fetch, finalize, getMessages, getMessages, getMessages, getMode, getNewMessageCount, getStore, getUnreadMessageCount, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MODE_MBOX
public static final int MODE_BLOB
public static final short ClassId
| Constructor Detail |
protected DBFolder(javax.mail.Store oStor,
java.lang.String sName)
| Method Detail |
protected JDCConnection getConnection()
public Category getCategory()
public java.lang.String getCategoryGuid()
Get Category GUID
Each folder has a Global Unique Identifier which is stored at column gu_category of table k_categories
public DBKeySet keySet()
throws java.sql.SQLException
Get set of identifiers for messages at this folder
Set entries are the mime identifiers for each message
java.sql.SQLException
public void appendMessages(javax.mail.Message[] msgs)
throws javax.mail.MessagingException,
java.lang.ArrayIndexOutOfBoundsException
msgs - Array of mime messages to be appended
javax.mail.MessagingException
java.lang.ArrayIndexOutOfBoundsException
public java.lang.String copyMessage(DBMimeMessage oSrcMsg)
throws javax.mail.MessagingException
oSrcMsg - Source message.
javax.mail.MessagingException
public void moveMessage(DBMimeMessage oSrcMsg)
throws javax.mail.MessagingException
oSrcMsg - Source message
javax.mail.MessagingException
public boolean create(int type)
throws javax.mail.MessagingException
java.lang.UnsupportedOperationException
javax.mail.MessagingException
public boolean create(java.lang.String sFolderName)
throws javax.mail.MessagingException
sFolderName - Folder Name
javax.mail.MessagingException
public void open(int mode)
throws javax.mail.MessagingException
mode - {READ_ONLY|READ_WRITE}
javax.mail.MessagingException
public void close(boolean expunge)
throws javax.mail.MessagingException
expunge -
javax.mail.MessagingException
public boolean delete(boolean recurse)
throws javax.mail.MessagingException
recurse - boolean
javax.mail.MessagingException
public javax.mail.Folder getFolder(java.lang.String name)
throws javax.mail.MessagingException
name - String Folder name or GUID
javax.mail.MessagingException
public boolean hasNewMessages()
throws javax.mail.MessagingException
java.lang.UnsupportedOperationException
javax.mail.MessagingException
public boolean renameTo(javax.mail.Folder f)
throws javax.mail.MessagingException,
javax.mail.StoreClosedException,
java.lang.NullPointerException
javax.mail.MessagingException
javax.mail.StoreClosedException
java.lang.NullPointerException
public boolean exists()
throws javax.mail.MessagingException,
javax.mail.StoreClosedException
javax.mail.MessagingException
javax.mail.StoreClosedException
public javax.mail.Message[] expunge()
throws javax.mail.MessagingException
Expunge deleted messages
This method removes from the database and the MBOX file those messages flagged as deleted at k_mime_msgs table
javax.mail.MessagingException
public void wipe()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic java.lang.String getFullName()
Get category subpath to directory holding MBOX files for this folder
The category path is composed by concatenating the names of all the parent folders separated by a slash. The name of a folder is stored at column nm_category of table k_categories
public java.lang.String getDirectoryPath()
public java.lang.String getFilePath()
public java.io.File getFile()
public java.lang.String getName()
public javax.mail.URLName getURLName()
throws javax.mail.MessagingException,
javax.mail.StoreClosedException
javax.mail.MessagingException
javax.mail.StoreClosedException
protected javax.mail.Message getMessage(java.lang.String sMsgId,
int IdType)
throws javax.mail.MessagingException
javax.mail.MessagingException
public java.lang.String appendMessage(javax.mail.internet.MimeMessage oMsg)
throws javax.mail.FolderClosedException,
javax.mail.StoreClosedException,
javax.mail.MessagingException,
java.lang.ArrayIndexOutOfBoundsException,
java.lang.NullPointerException
oMsg - MimeMessage
javax.mail.FolderClosedException
javax.mail.StoreClosedException
javax.mail.MessagingException
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException - if oMsg is null
public javax.mail.Message getMessage(int msgnum)
throws javax.mail.MessagingException
javax.mail.MessagingException
public DBMimeMessage getMessageByGuid(java.lang.String sMsgGuid)
throws javax.mail.MessagingException
javax.mail.MessagingException
public DBMimeMessage getMessageByID(java.lang.String sMsgGuid)
throws javax.mail.MessagingException
javax.mail.MessagingException
public int getMessageCount()
throws javax.mail.FolderClosedException,
javax.mail.MessagingException
javax.mail.FolderClosedException
javax.mail.MessagingException
public javax.mail.Folder getParent()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic javax.mail.Flags getPermanentFlags()
public char getSeparator()
throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.Folder[] list(java.lang.String pattern)
throws javax.mail.MessagingException
javax.mail.MessagingException
public int getType()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic boolean isOpen()
public java.util.Properties getMessageHeaders(java.lang.String sMsgId)
throws javax.mail.FolderClosedException,
java.sql.SQLException
Get message GUID, Id, Number, Subject, From and Reply-To from k_mime_msgs table
This method is mainly used for testing whether or not a message is already present at current folder.
sMsgId - String GUID or Id of message to be rerieved
javax.mail.FolderClosedException
java.sql.SQLException
public int importMbox(java.lang.String sMboxFilePath)
throws java.io.FileNotFoundException,
java.io.IOException,
javax.mail.MessagingException
java.io.FileNotFoundException
java.io.IOException
javax.mail.MessagingException
public void reindexMbox(java.lang.String sMboxFilePath)
throws java.io.FileNotFoundException,
java.io.IOException,
javax.mail.MessagingException,
java.sql.SQLException
sMboxFilePath - String Full path to MBOX file
java.io.FileNotFoundException
java.io.IOException
javax.mail.MessagingException
java.sql.SQLException
public void reindexMbox()
throws java.io.FileNotFoundException,
java.io.IOException,
javax.mail.MessagingException,
java.sql.SQLException
java.io.FileNotFoundException
java.io.IOException
javax.mail.MessagingException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||