Collaboration API Documentation

com.filenet.bso.api.collaboration
Interface Email

All Superinterfaces:
CollaborationObject, PersistentBaseObject

public interface Email
extends CollaborationObject, PersistentBaseObject

Classes that implement the Email interface enable content in the form of an email message.


Field Summary
static java.lang.String CC_HEADER
          Value of the "Cc" email header.
static java.lang.String COLLABORATIONTYPE_SYMNAME
          Value of the "CollaborationType" Content Engine property.
static java.lang.String DATE_HEADER
          Value of the "Date" email header.
static java.lang.String DIRECTCONTAINER_SYMNAME
          Value of the "DirectContainer" Content Engine property.
static java.lang.String EMAIL_ATTACHMENT_COUNT_SYMNAME
          Value of the "EmailAttachmentCount" Content Engine property.
static java.lang.String EMAIL_CC_SYMNAME
          Value of the "EmailCc" Content Engine property.
static java.lang.String EMAIL_DATE_STRING_SYMNAME
          Value of the "EmailDateString" Content Engine property.
static java.lang.String EMAIL_DATE_SYMNAME
          Value of the "EmailDate" Content Engine property.
static java.lang.String EMAIL_FROM_SYMNAME
          Value of the "EmailFrom" Content Engine property.
static java.lang.String EMAIL_HEADERS_SYMNAME
          Value of the "EmailHeaders" Content Engine property.
static java.lang.String EMAIL_IN_OWN_FOLDER_NAME_SYMNAME
          Value of the "EmailInOwnFolderName" Content Engine property.
static java.lang.String EMAIL_IN_REPLY_TO_SYMNAME
          Value of the "EmailInReplyTo" Content Engine property.
static java.lang.String EMAIL_MESSAGE_ID_SYMNAME
          Value of the "EmailMessageID" Content Engine property.
static java.lang.String EMAIL_MIME_TYPE
          Value of the MIME type used for email documents.
static java.lang.String EMAIL_MIME_TYPES_SYMNAME
          Value of the "EmailMIMETypes" Content Engine property.
static java.lang.String EMAIL_PERSONAL_FROM_SYMNAME
          Value of the "EmailPersonalFrom" Content Engine property.
static java.lang.String EMAIL_SUBJECT_SYMNAME
          Value of the "DocumentTitle" Content Engine property.
static java.lang.String EMAIL_THREAD_ID_SYMNAME
          Value of the "EmailThreadID" Content Engine property.
static java.lang.String EMAIL_TO_SYMNAME
          Value of the "EmailTo" Content Engine property.
static java.lang.String FROM_HEADER
          Value of the "From" email header.
static java.lang.String IN_REPLY_TO_HEADER
          Value of the "In-reply-to" email header.
static int MAX_STRING_SIZE
          Maximum size of any string property.
static java.lang.String MEMBERSHIPMANAGEDSECURITY_SYMNAME
          Value of "MembershipManagedSecurity"; Content Engine property.
static java.lang.String MESSAGE_ID_HEADER
          Value of the "Message-id" email header.
static java.lang.String[] PROPERTIES
           
static java.lang.String RECEIVED_HEADER
          Value of the "Received" email header.
static java.lang.String REFERENCES_HEADER
          Value of the "References" email header.
static java.lang.String RETURN_PATH_HEADER
          Value of the "Return-path" email header.
static java.lang.String SECURITYOWNERID_SYMNAME
          Value of "SecurityOwnerID"; Content Engine property.
static java.lang.String SUBJECT_HEADER
          Value of the "Subject" email header.
static java.lang.String TEAMSPACE_SYMNAME
          Value of the "Teamspace" Content Engine property.
static java.lang.String TO_HEADER
          Value of the "To" email header.
 
Method Summary
 int getAttachmentCount()
          Get the number of attachment files for the email message.
 EmailSubpart[] getAttachmentSubparts()
          Return an array of attachments for this email message.
 java.lang.String getCc()
          Get the value of the CC: header from the email message.
 com.filenet.wcm.api.TransportInputStream getContent()
          Return the email message content.
 com.filenet.wcm.api.TransportInputStream getContentElement(int elementNumber)
          Return the given content element for the email message.
 java.util.Date getDate()
          Get the "date sent" value (as converted from the value of the Date: header.
 java.lang.String getDateString()
          Get the "date sent" string (the original Date: header value).
 java.lang.String getFrom()
          Get the value of the From: header from the email message.
 java.lang.String[] getHeaders()
          Return the complete set of headers for the email message.
 java.lang.String getHeaderValue(java.lang.String name)
          Return the value for a given header.
 java.lang.String[] getHeaderValues(java.lang.String name)
          Return all values for a given header.
 EmailSubpart[] getInlineSubparts()
          Return an array of inline parts for this email message.
 java.lang.String getInOwnFolderName()
          Get the InOwnFolderName property of this email message.
 java.lang.String getInReplyTo()
          Get the value of the In-Reply-To: header for the email message.
 java.lang.String getMessageID()
          Get the value of the Message-Id: header for the email message.
 java.lang.String[] getMimeTypes()
          Return an array of strings where each element is the MIME type of the content of the message.
 java.lang.String getPersonalFrom()
          Get the value of the "Personal From" (the "personal" name derived from the From: header).
 EmailSubpart getRawMessage()
          Return the raw message/rfc822 formatted form of this email message, if available.
 java.lang.String getSubject()
          Get the value of the Subject: header from the email message.
 Teamspace getTeamspace()
          Return the teamspace containing this message.
 java.lang.String getThreadID()
          Return the MessageID of the first message in a thread.
 java.lang.String getTo()
          Get the value of the To: header from the email message.
 boolean isEmailComplex()
          Return whether this email message is "complex" or not.
 
Methods inherited from interface com.filenet.bso.api.collaboration.CollaborationObject
getSymbolicName, getType
 
Methods inherited from interface com.filenet.bso.api.collaboration.PersistentBaseObject
getBaseObject, getID, getObjectStore, getProperties, isMembershipManagedSecurity, isOwner, refresh, setProperties
 

Field Detail

SUBJECT_HEADER

public static final java.lang.String SUBJECT_HEADER
Value of the "Subject" email header.

TO_HEADER

public static final java.lang.String TO_HEADER
Value of the "To" email header.

CC_HEADER

public static final java.lang.String CC_HEADER
Value of the "Cc" email header.

DATE_HEADER

public static final java.lang.String DATE_HEADER
Value of the "Date" email header.

FROM_HEADER

public static final java.lang.String FROM_HEADER
Value of the "From" email header.

IN_REPLY_TO_HEADER

public static final java.lang.String IN_REPLY_TO_HEADER
Value of the "In-reply-to" email header.

MESSAGE_ID_HEADER

public static final java.lang.String MESSAGE_ID_HEADER
Value of the "Message-id" email header.

REFERENCES_HEADER

public static final java.lang.String REFERENCES_HEADER
Value of the "References" email header.

RETURN_PATH_HEADER

public static final java.lang.String RETURN_PATH_HEADER
Value of the "Return-path" email header.

RECEIVED_HEADER

public static final java.lang.String RECEIVED_HEADER
Value of the "Received" email header.

COLLABORATIONTYPE_SYMNAME

public static final java.lang.String COLLABORATIONTYPE_SYMNAME
Value of the "CollaborationType" Content Engine property.

DIRECTCONTAINER_SYMNAME

public static final java.lang.String DIRECTCONTAINER_SYMNAME
Value of the "DirectContainer" Content Engine property.

EMAIL_DATE_SYMNAME

public static final java.lang.String EMAIL_DATE_SYMNAME
Value of the "EmailDate" Content Engine property.

EMAIL_DATE_STRING_SYMNAME

public static final java.lang.String EMAIL_DATE_STRING_SYMNAME
Value of the "EmailDateString" Content Engine property.

EMAIL_FROM_SYMNAME

public static final java.lang.String EMAIL_FROM_SYMNAME
Value of the "EmailFrom" Content Engine property.

EMAIL_PERSONAL_FROM_SYMNAME

public static final java.lang.String EMAIL_PERSONAL_FROM_SYMNAME
Value of the "EmailPersonalFrom" Content Engine property.

EMAIL_TO_SYMNAME

public static final java.lang.String EMAIL_TO_SYMNAME
Value of the "EmailTo" Content Engine property.

EMAIL_CC_SYMNAME

public static final java.lang.String EMAIL_CC_SYMNAME
Value of the "EmailCc" Content Engine property.

EMAIL_SUBJECT_SYMNAME

public static final java.lang.String EMAIL_SUBJECT_SYMNAME
Value of the "DocumentTitle" Content Engine property.

EMAIL_MESSAGE_ID_SYMNAME

public static final java.lang.String EMAIL_MESSAGE_ID_SYMNAME
Value of the "EmailMessageID" Content Engine property.

EMAIL_IN_REPLY_TO_SYMNAME

public static final java.lang.String EMAIL_IN_REPLY_TO_SYMNAME
Value of the "EmailInReplyTo" Content Engine property.

EMAIL_THREAD_ID_SYMNAME

public static final java.lang.String EMAIL_THREAD_ID_SYMNAME
Value of the "EmailThreadID" Content Engine property.

EMAIL_HEADERS_SYMNAME

public static final java.lang.String EMAIL_HEADERS_SYMNAME
Value of the "EmailHeaders" Content Engine property.

EMAIL_IN_OWN_FOLDER_NAME_SYMNAME

public static final java.lang.String EMAIL_IN_OWN_FOLDER_NAME_SYMNAME
Value of the "EmailInOwnFolderName" Content Engine property.

EMAIL_ATTACHMENT_COUNT_SYMNAME

public static final java.lang.String EMAIL_ATTACHMENT_COUNT_SYMNAME
Value of the "EmailAttachmentCount" Content Engine property.

EMAIL_MIME_TYPES_SYMNAME

public static final java.lang.String EMAIL_MIME_TYPES_SYMNAME
Value of the "EmailMIMETypes" Content Engine property.

TEAMSPACE_SYMNAME

public static final java.lang.String TEAMSPACE_SYMNAME
Value of the "Teamspace" Content Engine property.

MEMBERSHIPMANAGEDSECURITY_SYMNAME

public static final java.lang.String MEMBERSHIPMANAGEDSECURITY_SYMNAME
Value of "MembershipManagedSecurity"; Content Engine property.

SECURITYOWNERID_SYMNAME

public static final java.lang.String SECURITYOWNERID_SYMNAME
Value of "SecurityOwnerID"; Content Engine property.

EMAIL_MIME_TYPE

public static final java.lang.String EMAIL_MIME_TYPE
Value of the MIME type used for email documents.

PROPERTIES

public static final java.lang.String[] PROPERTIES

MAX_STRING_SIZE

public static final int MAX_STRING_SIZE
Maximum size of any string property. String values that are longer than this are truncated to this size and are appended with an ellipsis ("..."). The maximum is generally applied only to the To: and Cc: headers, which may be lengthy. If a header is truncated, its full value can be found in the EmailHeaders property.
Method Detail

getDate

public java.util.Date getDate()
Get the "date sent" value (as converted from the value of the Date: header.
Returns:
The date sent

getDateString

public java.lang.String getDateString()
Get the "date sent" string (the original Date: header value).
Returns:
The date sent string

getFrom

public java.lang.String getFrom()
Get the value of the From: header from the email message. May be truncated if longer than 1024 bytes.
Returns:
The value of the From: header

getPersonalFrom

public java.lang.String getPersonalFrom()
Get the value of the "Personal From" (the "personal" name derived from the From: header).
Returns:
The value of the From: header

getTo

public java.lang.String getTo()
Get the value of the To: header from the email message. May be truncated if longer than 1024 bytes.
Returns:
The value of the To: header

getCc

public java.lang.String getCc()
Get the value of the CC: header from the email message. May be truncated if longer than 1024 bytes.
Returns:
The value of the CC: header

getSubject

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

getHeaders

public java.lang.String[] getHeaders()
Return the complete set of headers for the email message. The set may include headers which do not have their own property, such as Received: headers, which can be used to trace spam or possible forged email. This set also contains the original values of all headers, including headers such as To: and Cc: whose values may have been truncated.

The header strings will always be in the form name: value. Use code like this to parse the lines...

 String[] headers = email.getHeader();
 for (int i = 0; i < headers.length(); ++i)
 {
     String header = headers[i];
     int colon = header.indexOf(':');
     String name = header.substring(0, colon).toLowerCase();
     String value = null;
     if (colon + 2 < header.length())
         value = header.substring(colon + 2);
     :
     :
 }
 
Returns:
All headers for the email message as an array of strings

getHeaderValue

public java.lang.String getHeaderValue(java.lang.String name)
Return the value for a given header. This value includes any embedded newlines ('\n') if the original header occupies more than one line.
Parameters:
name - The name of the header
Returns:
The value or a null if this header does not appear

getHeaderValues

public java.lang.String[] getHeaderValues(java.lang.String name)
Return all values for a given header. This is useful for those headers (such as Received:), that may appear more than once in an email header. The returned values include any embedded newlines ('\n') if the original header(s) occupy more than one line.
Parameters:
name - The name of the header
Returns:
An array of the values or a null if this header does not appear

getContent

public com.filenet.wcm.api.TransportInputStream getContent()
Return the email message content. This is the assumed preferred version of the content if the message has more than one version. For example, the message may contain both a "text/plain" and a "text/html" version of the message, in which case the "text/html" version is returned.
Returns:
The assumed preferred version of the message's content

getContentElement

public com.filenet.wcm.api.TransportInputStream getContentElement(int elementNumber)
Return the given content element for the email message.
Parameters:
elementNumber - Which content element to return (one-based)
Returns:
The content of the message

getMimeTypes

public java.lang.String[] getMimeTypes()
Return an array of strings where each element is the MIME type of the content of the message. For example, a message might have two alternative versions of the same message, one in "text/plain" format and another in "text/html". In this case the method would return a string array with two elements, "text/plain" and "text/html".
Returns:
An array of strings for the MIME types of the textual parts of the email message

getMessageID

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

getInReplyTo

public java.lang.String getInReplyTo()
Get the value of the In-Reply-To: header for the email message. Returns null if the header is not found.
Returns:
the In-Reply-To: header's value

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: header, and, if they exist, the In-Reply-To: and References: headers.
Returns:
The MessageID of the first message in a thread

getAttachmentCount

public int getAttachmentCount()
Get the number of attachment files for the email message.
Returns:
The number of attachment files

isEmailComplex

public boolean isEmailComplex()
Return whether this email message is "complex" or not. A complex email message is one that has inline parts.
Returns:
true if this message is complex and false if it is simple

getAttachmentSubparts

public EmailSubpart[] getAttachmentSubparts()
Return an array of attachments for this email message.
Returns:
An array of attachments

getInlineSubparts

public EmailSubpart[] getInlineSubparts()
Return an array of inline parts for this email message.
Returns:
An array of inline parts

getRawMessage

public EmailSubpart getRawMessage()
Return the raw message/rfc822 formatted form of this email message, if available. If this not available, null is returned.
Returns:
The raw message

getTeamspace

public Teamspace getTeamspace()
Return the teamspace containing this message.
Returns:
The teamspace

getInOwnFolderName

public java.lang.String getInOwnFolderName()
Get the InOwnFolderName property of this email message. This is null if the message is in the top-level email container; otherwise, returns the name of a folder nested within an email container. "Complex" messages (those with inline parts) will be in their own folders, while "simple" messages will be in the top-level email container.
Returns:
The value of the InOwnFolderName property

Collaboration API Documentation

Copyright ?2002 - 2005 FileNet Corporation. All rights reserved.