Java Doc for DBMimeMessage.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.DBMimeMessage

DBMimeMessage
public class DBMimeMessage extends MimeMessage implements MimePart,Part(Code)
MIME messages stored at database BLOB columns or MBOX files
author:
   Sergio Montoro Ten
version:
   2.2


Field Summary
final public static  shortClassId
    

Constructor Summary
public  DBMimeMessage(Session oMailSession)
    
public  DBMimeMessage(MimeMessage oMsg)
    
public  DBMimeMessage(Session oMailSession, InputStream oInStrm)
    
public  DBMimeMessage(Folder oFldr, InputStream oInStrm)
    
public  DBMimeMessage(Folder oFldr, MimeMessage oMsg)
    
public  DBMimeMessage(Folder oFldr, DBMimeMessage oMsg)
    
public  DBMimeMessage(Folder oFldr, String sMsgGuid)
    

Method Summary
public  SMTPMessagecomposeFinalMessage(Session oMailSession, String sSubject, String sBody, String sId, String sContentType)
    
public static  voiddelete(JDCConnection oConn, String sFolderId, String sMimeMsgId)
    
public  Address[]getAllRecipients()
    

Get message recipients

This method read recipients from a message stored at k_inet_addrs table or if message is not already stored at k_inet_addrs then it delegates behaviour to parent class MimMessage.getAllRecipients() If this message is stored at the database then this method returnsan array of DBInetAddr objects.
public  MimePartgetBody()
    
public  StringgetContentType()
    
public  FlagsgetFlags()
    
public  FoldergetFolder()
    
public  DBInetAddrgetFromRecipient()
    
public static  StringgetGuidFromId(JDCConnection oConn, String sMsgId)
    
public  MimePartgetMessageBody()
    
public  StringgetMessageGuid()
    
public  MultipartgetParts()
    
public  Address[]getRecipients(Message.RecipientType cTpRecipient)
    

Get recipients of a particular type

This method first calls getAllRecipients() and then filters retrieved recipients by their type.
public  DategetSentDate()
    
public  StringgetSubject()
    
public  voidgetText(StringBuffer oBuffer)
    
public  StringgetText()
    
public  voidgetTextPlain(StringBuffer oBuffer)
    
public  voidsaveChanges()
    
public  voidsetFlag(Flags.Flag oFlg, boolean bFlg)
    
public  voidsetFolder(Folder oFldr)
    
public  voidsetMessageGuid(String sId)
    
public static  Stringsource(MimeMessage oMsg, String sEncoding)
    
public  StringtagBodyHtml()
    
public  StringtagBodyPlain()
    
public  voidwriteTo(OutputStream oOutStrm)
    

Field Detail
ClassId
final public static short ClassId(Code)




Constructor Detail
DBMimeMessage
public DBMimeMessage(Session oMailSession)(Code)
Create an empty message
Parameters:
  oMailSession -



DBMimeMessage
public DBMimeMessage(MimeMessage oMsg) throws MessagingException(Code)
Create DBMimeMessage from a MimeMessage and assign a new GUID
Parameters:
  oMsg - MimeMessage
throws:
  MessagingException -



DBMimeMessage
public DBMimeMessage(Session oMailSession, InputStream oInStrm) throws MessagingException(Code)
Create DBMimeMessage from an InputStream and assign a new GUID
Parameters:
  oMailSession - Session
Parameters:
  oInStrm - InputStream
throws:
  MessagingException -



DBMimeMessage
public DBMimeMessage(Folder oFldr, InputStream oInStrm) throws MessagingException, ClassCastException(Code)
Create DBMimeMessage from an InputStream, set folder and assign a new GUID
Parameters:
  Folder - oFldr
Parameters:
  oInStrm - InputStream
throws:
  MessagingException -



DBMimeMessage
public DBMimeMessage(Folder oFldr, MimeMessage oMsg) throws MessagingException(Code)
Create DBMimeMessage from a MimeMessage, set folder and assign a new GUID
Parameters:
  oFldr - Folder
Parameters:
  MimeMessage - oMsg
throws:
  MessagingException -



DBMimeMessage
public DBMimeMessage(Folder oFldr, DBMimeMessage oMsg) throws MessagingException(Code)

Create DBMimeMessage from another DBMimeMessage

GUID of this message is set to be the same as that of oMsg
Parameters:
  oFldr - Folder
Parameters:
  MimeMessage - oMsg
throws:
  MessagingException -



DBMimeMessage
public DBMimeMessage(Folder oFldr, String sMsgGuid) throws MessagingException(Code)
Create empty message at the given folder
Parameters:
  oFldr - Folder
Parameters:
  sMsgGuid - String Message GUID
throws:
  MessagingException -




Method Detail
composeFinalMessage
public SMTPMessage composeFinalMessage(Session oMailSession, String sSubject, String sBody, String sId, String sContentType) throws IOException, MessagingException, IllegalArgumentException, SecurityException(Code)

Create an SMTPMessage object from given components

Depending on what is inside, message structure is as follows :
Format/AttachmentsNoYes
plaintext/plainmultipart/mixed [text/plain, {attachment}]
html without imagesmultipart/alternative [text/plain, text/html]multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}]
html with imagesmultipart/alternative [text/plain, multipart/related[text/html, {image}]]multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}]

Parameters:
  oMailSession - Session
Parameters:
  sSubject - String Message subject or null
Parameters:
  sBody - String Message text body or null
Parameters:
  sId - String Contend-ID for message or null
Parameters:
  sContentType - String should be either "plain" or "html" SMTPMessage
throws:
  IOException -
throws:
  MessagingException -
throws:
  SecurityException -
throws:
  IllegalArgumentException - if sContentType is not "plain" or "html"



delete
public static void delete(JDCConnection oConn, String sFolderId, String sMimeMsgId) throws SQLException, IOException(Code)

Delete message from database

This method calls stored procedure k_sp_del_mime_msg

Parameters:
  oConn - JDBC database connection
Parameters:
  sFolderId - Folder GUID (k_mime_msgs.gu_category)
Parameters:
  sMimeMsgId - Message GUID (k_mime_msgs.gu_mimemsg)
throws:
  SQLException -



getAllRecipients
public Address[] getAllRecipients() throws MessagingException, NullPointerException, IllegalArgumentException(Code)

Get message recipients

This method read recipients from a message stored at k_inet_addrs table or if message is not already stored at k_inet_addrs then it delegates behaviour to parent class MimMessage.getAllRecipients() If this message is stored at the database then this method returnsan array of DBInetAddr objects. If this message has not been stored yet thenthis method returns an array of javax.mail.internet.InternetAddress objects
throws:
  MessagingException -
throws:
  NullPointerException -
throws:
  IllegalArgumentException -



getBody
public MimePart getBody() throws ParseException, MessagingException, IOException(Code)



getContentType
public String getContentType() throws MessagingException(Code)



getFlags
public Flags getFlags() throws MessagingException(Code)

Get message flags

Message flags are readed from k_mime_msgs table at the database Flags
throws:
  MessagingException -



getFolder
public Folder getFolder()(Code)
Get message folder Folder



getFromRecipient
public DBInetAddr getFromRecipient() throws MessagingException(Code)



getGuidFromId
public static String getGuidFromId(JDCConnection oConn, String sMsgId) throws SQLException(Code)



getMessageBody
public MimePart getMessageBody() throws ParseException, MessagingException, IOException(Code)



getMessageGuid
public String getMessageGuid()(Code)

Get message GUID

If message had no previous GUID then a new one is assigned String



getParts
public Multipart getParts() throws MessagingException, IOException, NullPointerException(Code)
Get message parts as an array of DBMimePart objects DBMimeMultiPart if this message folder is of type DBFolderor another type of Object if this message folder is another subclass of javax.mail.Foldersuch as POP3Folder.
throws:
  MessagingException -
throws:
  IOException -
throws:
  NullPointerException - If this message Folder is null



getRecipients
public Address[] getRecipients(Message.RecipientType cTpRecipient) throws MessagingException(Code)

Get recipients of a particular type

This method first calls getAllRecipients() and then filters retrieved recipients by their type.
Parameters:
  cTpRecipient - javax.mail.Message.RecipientType Address[]
throws:
  MessagingException -



getSentDate
public Date getSentDate() throws MessagingException(Code)



getSubject
public String getSubject() throws MessagingException(Code)



getText
public void getText(StringBuffer oBuffer) throws MessagingException, IOException, ClassCastException(Code)
Get message body text into a StringBuffer
Parameters:
  oBuffer - StringBuffer
throws:
  MessagingException -
throws:
  IOException -
throws:
  ClassCastException -



getText
public String getText() throws MessagingException, IOException(Code)



getTextPlain
public void getTextPlain(StringBuffer oBuffer) throws MessagingException, IOException(Code)



saveChanges
public void saveChanges() throws MessagingException(Code)



setFlag
public void setFlag(Flags.Flag oFlg, boolean bFlg) throws MessagingException(Code)



setFolder
public void setFolder(Folder oFldr)(Code)
Set message folder
Parameters:
  oFldr - Folder



setMessageGuid
public void setMessageGuid(String sId)(Code)
Set message GUID
Parameters:
  sId - String



source
public static String source(MimeMessage oMsg, String sEncoding) throws MessagingException, UnsupportedEncodingException, IOException(Code)



tagBodyHtml
public String tagBodyHtml() throws java.io.IOException, javax.mail.MessagingException(Code)



tagBodyPlain
public String tagBodyPlain() throws java.io.IOException, javax.mail.MessagingException(Code)



writeTo
public void writeTo(OutputStream oOutStrm) throws IOException, FolderClosedException, MessagingException(Code)



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