Collaboration API Documentation

com.filenet.bso.api.collaboration.data
Class EmailInfo

java.lang.Object
  |
  +--com.filenet.bso.api.collaboration.data.EmailInfo
All Implemented Interfaces:
java.io.Serializable

public class EmailInfo
extends java.lang.Object
implements java.io.Serializable

The EmailInfo class is a collection of data used to create a teamspace email message. A teamspace email message is created by generating a EmailInfo object from the CollaborationFactory and adding it to the teamspace email container via it's addContainee() method.

See Also:
CollaborationFactory, Serialized Form

Constructor Summary
protected EmailInfo()
          The default constructor.
  EmailInfo(Teamspace teamspace, javax.mail.internet.MimeMessage message, java.lang.String ownerID, boolean isDebug)
          Construct the email info object.
 
Method Summary
 int getAttachmentCount()
          Return the number of attachments in the email message.
 EmailSubpartInfo[] getAttachmentParts()
          Get the message attachments.
 java.lang.String getCc()
          Get the 'To' email header for the message.
 java.util.Date getDate()
          Get the date sent as a Date.
 java.lang.String getDateString()
          Get the date sent as a string.
 com.filenet.wcm.api.Folder getDirectContainer()
          Get the folder that this email message will be placed into.
 java.lang.String getFrom()
          Get the 'From' email header for the message.
 java.util.Enumeration getHeaders()
          Get all the headers that are associated with the message.
 EmailSubpartInfo[] getInlineParts()
          Get the inline/embedded parts of the message.
 java.lang.String getInOwnFolderName()
          Get the inOwnFolderName property for the message.
 java.lang.String getInReplyTo()
          Get the value of the In-Reply-To: message header.
 java.lang.String getMessageID()
          Get the message ID for the email message.
 java.lang.String getOwnerID()
          Get the member ID of the message creator (set to the special user ID used when running the collaboration's email server).
 com.filenet.wcm.api.Properties getProperties()
          Return the entire set of properties for this email message.
 EmailSubpartInfo getRawMessage()
          Get the raw message as a message/rfc822 subpart.
 java.lang.String getSubject()
          Get the subject for the email message.
 Teamspace getTeamspace()
          Get the teamspace that this email message belongs to.
 EmailSubpartInfo[] getTextParts()
          Get the text parts of the message.
 java.lang.String getThreadID()
          Return the MessageID of the first message in a thread.
 java.lang.String getTo()
          Get the 'To' email header for the message.
 boolean isComplexMessage()
          Test the message for "complex" construction (such as messages with inline/embedded parts).
 void setDirectContainer(com.filenet.wcm.api.Folder name)
          Set the folder that this email message should be placed into.
 void setInOwnFolderName(java.lang.String name)
          Set the inOwnFolderName property for the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailInfo

protected EmailInfo()
The default constructor.

EmailInfo

public EmailInfo(Teamspace teamspace,
                 javax.mail.internet.MimeMessage message,
                 java.lang.String ownerID,
                 boolean isDebug)
          throws javax.mail.MessagingException
Construct the email info object.
Parameters:
teamspace - The teamspace in which the message is to be archived
message - The raw message
ownerID - The LDAP SID of the user who will be granted CREATOR OWNER rights for this object
Throws:
javax.mail.MessagingException - on any error
Method Detail

getHeaders

public java.util.Enumeration getHeaders()
                                 throws javax.mail.MessagingException
Get all the headers that are associated with the message.
Returns:
an enumerator that can be used to step through Header objects.
Throws:
javax.mail.MessagingException - if a problem with the message is encountered

getTextParts

public EmailSubpartInfo[] getTextParts()
Get the text parts of the message. The returned array of EmailSubpartInfo objects each represent one alternative representation of the message. For example, the first part might be a plain text message and the second an HTML-formatted message. Normally, the MIME types of these will be text/plain, text/html, text/rtf, etc., but a special case is made for application/pdf, which is also considered a textual representation.
Returns:
An array of messages. If no textual parts exist (if, for example, the message contains only attachments), a zero length array is returned.

getInlineParts

public EmailSubpartInfo[] getInlineParts()
Get the inline/embedded parts of the message. These parts will usually be images, but could also be sound, text, etc. If this message does have inline parts, it is considered a "complex" message that is accessed and stored somewhat differently than "simple" messages.
Returns:
an array of the inline objects. The array will be zero length if there are no inline objects.

getAttachmentParts

public EmailSubpartInfo[] getAttachmentParts()
Get the message attachments.
Returns:
an array of attached objects. The array will be zero length if there are no attachments.

getDate

public java.util.Date getDate()
Get the date sent as a Date.
Returns:
the date sent

getDateString

public java.lang.String getDateString()
Get the date sent as a string.
Returns:
the date sent

getFrom

public java.lang.String getFrom()
Get the 'From' email header for the message.
Returns:
a string of the From header. This will be "as is" from the original message and will not be interpreted.

getTo

public java.lang.String getTo()
Get the 'To' email header for the message. This header might be truncated at 1024 characters if the original was longer than that and have "..." appended. If the original header is required, then use the getHeaders() method.
Returns:
a string of the To header. This will be "as is" from the original message, with the exception that it might be truncated if it is too long.
See Also:
getHeaders()

getCc

public java.lang.String getCc()
Get the 'To' email header for the message. The header might be truncated at 1024 characters if the original was longer than that and have "..." appended. If the original header is required, then use the getHeaders() method.
Returns:
a string of the To header. This will be "as is" from the original message, with the exception that it might be truncated if it is too long.
See Also:
getHeaders()

getSubject

public java.lang.String getSubject()
Get the subject for the email message.
Returns:
the value of the Subject: header

getMessageID

public java.lang.String getMessageID()
Get the message ID for the email message.
Returns:
the value of the Message-Id: header

getInReplyTo

public java.lang.String getInReplyTo()
Get the value of the In-Reply-To: message header.
Returns:
the value of the In-Reply-To: header

getThreadID

public java.lang.String getThreadID()
Return the MessageID of the first message in a thread. This ID is determined by examining the values of the email's Message-Id:, In-Reply-To: and References: headers. This value is not always accurate since not all email clients use the same header conventions. In the worst case, the Message-Id: header (which is required for all email messages) is used.
Returns:
the determined MessageID of the first message in a thread

getTeamspace

public Teamspace getTeamspace()
Get the teamspace that this email message belongs to.
Returns:
the teamspace

getOwnerID

public java.lang.String getOwnerID()
Get the member ID of the message creator (set to the special user ID used when running the collaboration's email server).
Returns:
the member ID

getRawMessage

public EmailSubpartInfo getRawMessage()
Get the raw message as a message/rfc822 subpart. This will be null unless the isDebug flag was set in the constructor.
Returns:
the raw message

getAttachmentCount

public int getAttachmentCount()
Return the number of attachments in the email message. If there are no attachments, the return value is zero.
Returns:
the number of attachments

isComplexMessage

public boolean isComplexMessage()
Test the message for "complex" construction (such as messages with inline/embedded parts).
Returns:
true if the message is complex, false if not

getInOwnFolderName

public java.lang.String getInOwnFolderName()
Get the inOwnFolderName property for the message. This will be set for complex email messages (such as those with inline parts) and will be null if not.
Returns:
the value of the inOwnFolderName property.

setInOwnFolderName

public void setInOwnFolderName(java.lang.String name)
Set the inOwnFolderName property for the message.
Parameters:
name - the name of the folder into which the complex message is to be placed

getDirectContainer

public com.filenet.wcm.api.Folder getDirectContainer()
Get the folder that this email message will be placed into. For complex messages (such as those with inline parts), this should match the inOwnFolderName. For simple messages, this should be the same as the email container.
Returns:
the folder that this email message will be place into

setDirectContainer

public void setDirectContainer(com.filenet.wcm.api.Folder name)
Set the folder that this email message should be placed into.
Parameters:
name - the folder

getProperties

public com.filenet.wcm.api.Properties getProperties()
                                             throws javax.mail.MessagingException
Return the entire set of properties for this email message.
Returns:
the properties
Throws:
javax.mail.MessagingException - if something went wrong when retrieving the headers.

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.