| com.knowgate.hipermail.DBFolder
DBFolder | public class DBFolder extends Folder (Code) | | 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
Category behaviour is obtained by delegation to a private Category instance.
For each DBFolder there is a corresponding row at k_categories database table.
author: Sergio Montoro Ten version: 3.0 |
ClassId | final public static short ClassId(Code) | | |
MODE_BLOB | final public static int MODE_BLOB(Code) | | |
MODE_MBOX | final public static int MODE_MBOX(Code) | | |
close | public void close(boolean expunge) throws MessagingException(Code) | | Close this folder
Parameters: expunge - throws: MessagingException - |
copyMessage | public String copyMessage(DBMimeMessage oSrcMsg) throws MessagingException(Code) | | Copy a DBMimeMessage from another DBFolder to this DBFolder
Parameters: oSrcMsg - Source message. GUID of new message throws: MessagingException - |
create | public boolean create(int type) throws MessagingException(Code) | | This method is not implemented and will always raise UnsupportedOperationException
throws: UnsupportedOperationException - |
create | public boolean create(String sFolderName) throws MessagingException(Code) | | Create DBFolder with given name under current user mailroot Category
Parameters: sFolderName - Folder Name true throws: MessagingException - |
delete | public boolean delete(boolean recurse) throws MessagingException(Code) | | Wipe all messages and delete this folder
Parameters: recurse - boolean boolean throws: MessagingException - |
exists | public boolean exists() throws MessagingException, StoreClosedException(Code) | | |
expunge | public Message[] expunge() throws MessagingException(Code) | | Expunge deleted messages
This method removes from the database and the MBOX file those messages flagged
as deleted at k_mime_msgs table
null throws: MessagingException - |
getCategory | public Category getCategory()(Code) | | Get instance of com.knowgate.hipergate.Category object
|
getCategoryGuid | public String getCategoryGuid()(Code) | | Get Category GUID
Each folder has a Global Unique Identifier which is stored at column
gu_category of table k_categories
String Category GUID or null if category is not set |
getDirectoryPath | public String getDirectoryPath()(Code) | | Get path to directory containing files belonging to this folder
String |
getFile | public File getFile()(Code) | | Get MBOX file that holds messages for this DBFolder
java.io.File object representing MBOX file. |
getFilePath | public String getFilePath()(Code) | | Get full path to MBOX file containing mime messages
String |
getFolder | public Folder getFolder(String name) throws MessagingException(Code) | | Get folder by name or GUID
Parameters: name - String Folder name or GUID Folder throws: MessagingException - |
getFullName | public String getFullName()(Code) | | 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
String |
getMessage | protected Message getMessage(String sMsgId, int IdType) throws MessagingException(Code) | | |
getMessage | public Message getMessage(int msgnum) throws MessagingException(Code) | | |
getMessageCount | public int getMessageCount() throws FolderClosedException, MessagingException(Code) | | |
getMessageHeaders | public Properties getMessageHeaders(String sMsgId) throws FolderClosedException, SQLException(Code) | | 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.
Parameters: sMsgId - String GUID or Id of message to be rerieved Properties {gu_mimemsg, id_message, pg_message, tx_subject, tx_email_from, tx_email_reply, nm_from }or null if no message with such sMsgId was found referenced at k_mime_msgsfor current folder throws: FolderClosedException - throws: SQLException - |
getName | public String getName()(Code) | | Get column nm_category from table k_categories for this folder
String |
getParent | public Folder getParent() throws MessagingException(Code) | | |
getPermanentFlags | public Flags getPermanentFlags()(Code) | | |
getSeparator | public char getSeparator() throws MessagingException(Code) | | |
getType | public int getType() throws MessagingException(Code) | | |
getURLName | public URLName getURLName() throws MessagingException, StoreClosedException(Code) | | |
hasNewMessages | public boolean hasNewMessages() throws MessagingException(Code) | | This method is not implemented and will always raise UnsupportedOperationException
throws: UnsupportedOperationException - |
isOpen | public boolean isOpen()(Code) | | |
keySet | public DBKeySet keySet() throws SQLException(Code) | | Get set of identifiers for messages at this folder
Set entries are the mime identifiers for each message
DBKeySet throws: SQLException - |
list | public Folder[] list(String pattern) throws MessagingException(Code) | | |
moveMessage | public void moveMessage(DBMimeMessage oSrcMsg) throws MessagingException(Code) | | Move a DBMimeMessage from another DBFolder to this DBFolder
Parameters: oSrcMsg - Source message throws: MessagingException - |
open | public void open(int mode) throws MessagingException(Code) | | Open this DBFolder
Parameters: mode - {READ_ONLY|READ_WRITE} throws: MessagingException - |
wipe | public void wipe() throws MessagingException(Code) | | Delete all messages from this folder and clear MBOX file
throws: MessagingException - |
|
|