Java Doc for DBFolder.java in  » Groupware » hipergate » com » knowgate » hipermail » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Groupware » hipergate » com.knowgate.hipermail 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
final public static  shortClassId
    
final public static  intMODE_BLOB
    
final public static  intMODE_MBOX
    

Constructor Summary
protected  DBFolder(Store oStor, String sName)
    

Method Summary
public  StringappendMessage(MimeMessage oMsg)
    
public  voidappendMessages(Message[] msgs)
    
public  voidclose(boolean expunge)
    
public  StringcopyMessage(DBMimeMessage oSrcMsg)
     Copy a DBMimeMessage from another DBFolder to this DBFolder
Parameters:
  oSrcMsg - Source message.
public  booleancreate(int type)
    
public  booleancreate(String sFolderName)
    
public  booleandelete(boolean recurse)
    
public  booleanexists()
    
public  Message[]expunge()
    
public  CategorygetCategory()
    
public  StringgetCategoryGuid()
    
protected  JDCConnectiongetConnection()
    
public  StringgetDirectoryPath()
    
public  FilegetFile()
    
public  StringgetFilePath()
    
public  FoldergetFolder(String name)
    
public  StringgetFullName()
    

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.
protected  MessagegetMessage(String sMsgId, int IdType)
    
public  MessagegetMessage(int msgnum)
    
public  DBMimeMessagegetMessageByGuid(String sMsgGuid)
    
public  DBMimeMessagegetMessageByID(String sMsgId)
    
public  intgetMessageCount()
    
public  PropertiesgetMessageHeaders(String sMsgId)
    

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.
public  StringgetName()
    
public  FoldergetParent()
    
public  FlagsgetPermanentFlags()
    
public  chargetSeparator()
    
public  intgetType()
    
public  URLNamegetURLName()
    
public  booleanhasNewMessages()
    
public  intimportMbox(String sMboxFilePath)
    
public  booleanisOpen()
    
public  DBKeySetkeySet()
    
public  Folder[]list(String pattern)
    
public  voidmoveMessage(DBMimeMessage oSrcMsg)
    
public  voidopen(int mode)
    
public  voidreindexMbox(String sMboxFilePath)
    
public  voidreindexMbox()
    
public  booleanrenameTo(Folder f)
    
public  voidwipe()
    

Field Detail
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)




Constructor Detail
DBFolder
protected DBFolder(Store oStor, String sName)(Code)




Method Detail
appendMessage
public String appendMessage(MimeMessage oMsg) throws FolderClosedException, StoreClosedException, MessagingException, ArrayIndexOutOfBoundsException, NullPointerException(Code)

Parameters:
  oMsg - MimeMessage String
throws:
  FolderClosedException -
throws:
  StoreClosedException -
throws:
  MessagingException -
throws:
  ArrayIndexOutOfBoundsException -
throws:
  NullPointerException - if oMsg is null



appendMessages
public void appendMessages(Message[] msgs) throws MessagingException, ArrayIndexOutOfBoundsException(Code)
Append messages to this DBFolder
Parameters:
  msgs - Array of mime messages to be appended
throws:
  MessagingException -
throws:
  ArrayIndexOutOfBoundsException -



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



getConnection
protected JDCConnection getConnection()(Code)



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)



getMessageByGuid
public DBMimeMessage getMessageByGuid(String sMsgGuid) throws MessagingException(Code)



getMessageByID
public DBMimeMessage getMessageByID(String sMsgId) 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 -



importMbox
public int importMbox(String sMboxFilePath) throws FileNotFoundException, IOException, MessagingException(Code)



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 -



reindexMbox
public void reindexMbox(String sMboxFilePath) throws FileNotFoundException, IOException, MessagingException, SQLException(Code)
Delete every message from the index and rebuild it by re-reading the specified MBOX file
Parameters:
  sMboxFilePath - String Full path to MBOX file
throws:
  FileNotFoundException -
throws:
  IOException -
throws:
  MessagingException -
throws:
  SQLException -



reindexMbox
public void reindexMbox() throws FileNotFoundException, IOException, MessagingException, SQLException(Code)
Delete very message from th eindex and rebuild it by reading the default MBOX file for this folder
throws:
  FileNotFoundException -
throws:
  IOException -
throws:
  MessagingException -
throws:
  SQLException -



renameTo
public boolean renameTo(Folder f) throws MessagingException, StoreClosedException, NullPointerException(Code)



wipe
public void wipe() throws MessagingException(Code)
Delete all messages from this folder and clear MBOX file
throws:
  MessagingException -



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.