com.genesyslab.ail
Interface InteractionMailOut

All Superinterfaces:
AbstractInteraction, IdObject, Interaction, InteractionMail, InteractionMultimedia, Possible, Savable
All Known Subinterfaces:
InteractionInvitationOut, InteractionReplyOut

public interface InteractionMailOut
extends InteractionMail

This interface is for managing an outbound e-mail.

It provides the following actions:

For details about these features, see the corresponding methods.

To get instances of this interface, your application can create them by:

To determine which actions are available at a certain time, test the corresponding InteractionMailOut.Action value by calling the Possible.isPossible(com.genesyslab.ail.Enum) method. For example, use the possible actions to activate or deactivate buttons that make calls to the corresponding InteractionMailOut methods.

Actions on the outbound e-mail interaction generate InteractionEvent events for changes in interaction status and data (see PlaceListener and AgentListener). Use those events to update your application's state.

To initiate a collaboration session on this e-mail interaction, create an outgoing invitation draft on the related outgoing e-mail interaction, as shown in the following code snippet.

 InteractionInvitationOut myInvitationsToSend = myInteractionMailOut.createCollaborationInvitation();

You need only a single InteractionInvitationOut interaction to send invitations to several participants. See InteractionInvitationOut for details about managing participants and sending invitations.

For each participant in the collaboration session, this interface accesses a corresponding InteractionInvitationParentIn interaction. To get the set of parent invitations, call the getSentInvitations() method. See InteractionInvitationParentIn for further details about managing parent invitations.


Nested Class Summary
static class InteractionMailOut.Action
          Actions possible on outgoing e-mails.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.InteractionMultimedia
InteractionMultimedia.StopProcessingReason
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.Interaction
Interaction.Status, Interaction.Type
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.AbstractInteraction
AbstractInteraction.AbstractCallType
 
Field Summary
 
Fields inherited from interface com.genesyslab.ail.InteractionMail
QUOTE_HEADER_CONTACT, QUOTE_HEADER_DATE
 
Method Summary
 void addAttachment(java.lang.String file_name, byte[] buffer, java.lang.String mime_type)
          Deprecated.  
 Attachment addAttachmentEx(java.lang.String file_name, byte[] buffer, java.lang.String mime_type)
          Adds an attached file to this e-mail.
 void addInvitationListener(InvitationListener invitation_listener)
          Registers a listener for invitation events.
 void copyAttachments(java.util.Collection attachments)
          Copies the Attachment instances from another source (a StandardResponse or another InteractionMailOut) into this interaction.
 InteractionInvitationOut createCollaborationInvitation()
          Creates the invitation for collaboration.
 EmailAddress[] getBccAddresses()
          Returns the addresses to which copies of this e-mail will be silently sent.
 java.util.Collection getDraftInvitation()
          Returns the invitation currently being composed for this outgoing e-mail.
 EmailAddress getReplyToAddress()
          Returns the reply-to address of this e-mail.
 java.util.Collection getSentInvitations()
          Returns the sent invitations for this outgoing e-mail.
 boolean isQAReview()
          Returns true if this interaction is submitted for QA review.
 void removeAttachment(int index)
          Deprecated.  
 void removeAttachment(java.lang.String id)
          Removes an attached file.
 void removeInvitationListener(InvitationListener invitation_listener)
          Unregisters a listener on invitation events.
 void send(java.lang.String queue)
          Sends this e-mail.
 void setBccAddresses(EmailAddress[] bcc)
          Sets the addresses to which copies of this e-mail will be silently sent.
 void setCcAddresses(EmailAddress[] cc)
          Sets the addresses to which copies of this e-mail will be sent.
 void setFromAddress(EmailAddress emailAddress)
          Sets the address from which this e-mail will be sent.
 void setMessageText(java.lang.String message)
          Sets the body of the message.
 void setReplyToAddress(EmailAddress replyto_address)
          Sets the reply-to address of this e-mail.
 void setSubject(java.lang.String subject)
          Sets the subject of this e-mail.
 void setToAddresses(EmailAddress[] to)
          Sets the addresses to which this e-mail will be sent.
 
Methods inherited from interface com.genesyslab.ail.InteractionMail
getAttachment, getAttachments, getCcAddresses, getDateSent, getFromAddress, getMessageText, getMimeMessage, getToAddresses, hasAttachments
 
Methods inherited from interface com.genesyslab.ail.InteractionMultimedia
addSuggestedCategories, delete, getAvailableQueuesForChildInteraction, getAvailableQueuesForThisInteraction, getCategoryId, getExternalId, getInteractionSubtype, getInteractionType, getIsCategoryApproved, getMaxSubjectLength, getMediaType, getQueue, getSuggestedCategories, isMarkDoneAvailable, placeInQueue, setAttachedData, setAvailableQueuesForChildInteraction, setAvailableQueuesForThisInteraction, setCategoryId, setExternalId, setIsCategoryApproved, submit, transferAgent, transferPlace, transferQueue
 
Methods inherited from interface com.genesyslab.ail.Interaction
answerCall, countOtherPendingInteractions, getContactId, getContentBinary, getContentBinaryMimeType, getContentBinarySize, getDateCreated, getDn, getEndDate, getMedia, getNotepad, getParentInteraction, getPlace, getStatus, getStructTextMimeType, getStructuredText, getSubject, getText, getType, getUserName, isDone, markDone, merge, releaseCall, save, setContactId, setContentBinary, setContentBinaryMimeType, setContentBinarySize, setNotepad, setStructTextMimeType, setStructuredText, setText
 
Methods inherited from interface com.genesyslab.ail.AbstractInteraction
addInteractionListener, getAttachedData, getAttachedData, getAttachedDataEx, getTConnectionId, queryStatus, removeAttachedData, removeInteractionListener, saveAttachedData, setAttachedData
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.Savable
getContactServerId, isDirty
 

Method Detail

getBccAddresses

EmailAddress[] getBccAddresses()
                               throws RequestFailedException
Returns the addresses to which copies of this e-mail will be silently sent. Blind Carbon Copy addresses do not appear in the received e-mails.

Throws:
RequestFailedException

setMessageText

void setMessageText(java.lang.String message)
                    throws RequestFailedException
Sets the body of the message.

Throws:
RequestFailedException

setSubject

void setSubject(java.lang.String subject)
                throws RequestFailedException
Sets the subject of this e-mail.

Specified by:
setSubject in interface Interaction
Throws:
RequestFailedException

setFromAddress

void setFromAddress(EmailAddress emailAddress)
                    throws RequestFailedException
Sets the address from which this e-mail will be sent.

Throws:
RequestFailedException

setToAddresses

void setToAddresses(EmailAddress[] to)
                    throws RequestFailedException
Sets the addresses to which this e-mail will be sent.

Throws:
RequestFailedException

setCcAddresses

void setCcAddresses(EmailAddress[] cc)
                    throws RequestFailedException
Sets the addresses to which copies of this e-mail will be sent.

Throws:
RequestFailedException

setBccAddresses

void setBccAddresses(EmailAddress[] bcc)
                     throws RequestFailedException
Sets the addresses to which copies of this e-mail will be silently sent. Blind Carbon Copy addresses do not appear in the received e-mails.

Throws:
RequestFailedException

isQAReview

boolean isQAReview()
Returns true if this interaction is submitted for QA review.


addAttachment

void addAttachment(java.lang.String file_name,
                   byte[] buffer,
                   java.lang.String mime_type)
                   throws RequestFailedException
Deprecated. 

Adds an attached file to this e-mail.

Parameters:
file_name - the name of the file to attach.
buffer - a buffer containing the body of the file to attach.
mime_type - the MIME type of this attachment.
Throws:
RequestFailedException

addAttachmentEx

Attachment addAttachmentEx(java.lang.String file_name,
                           byte[] buffer,
                           java.lang.String mime_type)
                           throws RequestFailedException
Adds an attached file to this e-mail.

Parameters:
file_name - the name of the file to attach.
buffer - a buffer containing the body of the file to attach.
mime_type - the MIME type of this attachment.
Returns:
the Attachment object with ID
Throws:
RequestFailedException

removeAttachment

void removeAttachment(int index)
                      throws RequestFailedException
Deprecated. 

Removes an attached file.

Parameters:
index - the index of the attachment to remove. Please refer to the order of attachments as returned by InteractionMail.getAttachments().
Throws:
RequestFailedException

removeAttachment

void removeAttachment(java.lang.String id)
                      throws RequestFailedException
Removes an attached file.

Parameters:
id - the identifier of the attachment to remove.
Throws:
RequestFailedException

send

void send(java.lang.String queue)
          throws RequestFailedException
Sends this e-mail.

Parameters:
queue - the queue through which this e-mail must be sent. If null, the e-mail will be sent into the queue where it was originally created.
Throws:
IsServiceException - if there is a problem with the Interaction Server.
RequestFailedException

createCollaborationInvitation

InteractionInvitationOut createCollaborationInvitation()
                                                       throws RequestFailedException
Creates the invitation for collaboration.

Returns:
a collaboration invitation.
Throws:
RequestFailedException - if another invitation is already in process.

getSentInvitations

java.util.Collection getSentInvitations()
                                        throws RequestFailedException
Returns the sent invitations for this outgoing e-mail.

Returns:
a Collection of InteractionInvitationParentIn invitations. The collection will be empty if no invitation was ever sent for this e-mail.
Throws:
RequestFailedException

getDraftInvitation

java.util.Collection getDraftInvitation()
                                        throws RequestFailedException
Returns the invitation currently being composed for this outgoing e-mail. The collection will be empty if no invitation is being created, or only one if there is a draft invitation being created.

Returns:
a Collection containg zero or one InteractionInvitationOut.
Throws:
RequestFailedException

addInvitationListener

void addInvitationListener(InvitationListener invitation_listener)
Registers a listener for invitation events. This listener will be notified when invitations are added and deleted.

Parameters:
invitation_listener - the listener to register.

removeInvitationListener

void removeInvitationListener(InvitationListener invitation_listener)
Unregisters a listener on invitation events. This listener will no longer be notified of invitation events.

Parameters:
invitation_listener - the listener to unregister.

getReplyToAddress

EmailAddress getReplyToAddress()
                               throws RequestFailedException
Returns the reply-to address of this e-mail.

Returns:
an EmailAddress object.
Throws:
RequestFailedException
Since:
7.5

setReplyToAddress

void setReplyToAddress(EmailAddress replyto_address)
                       throws RequestFailedException
Sets the reply-to address of this e-mail.

Parameters:
replyto_address - an EmailAddress object.
Throws:
RequestFailedException
Since:
7.5.

copyAttachments

void copyAttachments(java.util.Collection attachments)
                     throws RequestFailedException
Copies the Attachment instances from another source (a StandardResponse or another InteractionMailOut) into this interaction.

Parameters:
attachments - Collection of Attachments.
Throws:
RequestFailedException - if the request fails.
Since:
7.5.