org.opencrx.application.mail.importer
Class SimpleMimeMessage

java.lang.Object
  extended by org.opencrx.application.mail.importer.SimpleMimeMessage

public class SimpleMimeMessage
extends Object

Helper class to provide a more simple access to the regularly used attributes of a mime message for importing emails.


Constructor Summary
SimpleMimeMessage(MimeMessage theMessage)
          Constructor
 
Method Summary
 boolean containsNestedMessage()
          Checks whether the message contains binary attachments.
 Collection getBinaryContents()
          Returns a collection of the binary attachments or null if the message does not contain any.
 MimeMessage getMimeMessage()
           
 String getSubject()
          Extracts the subject of the message and cache it locally.
 void markAsDeleted()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMimeMessage

public SimpleMimeMessage(MimeMessage theMessage)
                  throws MessagingException,
                         IOException,
                         ServiceException
Constructor

Parameters:
theMessage - the MimeMessage which has to be wrapped
Throws:
MessagingException
IOException
ServiceException
Method Detail

getMimeMessage

public MimeMessage getMimeMessage()

getSubject

public String getSubject()
                  throws MessagingException
Extracts the subject of the message and cache it locally. If the message contains several subject entries, these entries are concatenated using the system's line separator.

Returns:
the subject of the message
Throws:
MessagingException

containsNestedMessage

public boolean containsNestedMessage()
Checks whether the message contains binary attachments.

Returns:
true, if the message contains some binary attachments

getBinaryContents

public Collection getBinaryContents()
Returns a collection of the binary attachments or null if the message does not contain any.

Returns:
collection of the binary attachments or null otherwise

markAsDeleted

public void markAsDeleted()


This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.