com.genesyslab.ail
Interface Interaction

All Superinterfaces:
AbstractInteraction, IdObject, Possible, Savable
All Known Subinterfaces:
InteractionCallbackRequest, InteractionChat, InteractionCoBrowse, InteractionInvitationIn, InteractionInvitationOut, InteractionInvitationParentIn, InteractionMail, InteractionMailIn, InteractionMailOut, InteractionMultimedia, InteractionOpenMedia, InteractionReplyOut, InteractionVoice, InteractionVoiceCallback, InteractionVoiceOutbound, InteractionWebcallback

public interface Interaction
extends AbstractInteraction, Savable

Representation of an interaction in the Agent Interaction Layer.


Nested Class Summary
static class Interaction.Action
          Constants for the possible actions on interactions, common for all media.
static class Interaction.Status
          Constants for interaction statuses, common for all media.
static class Interaction.Type
          Constants that describe the possible types of interactions.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.AbstractInteraction
AbstractInteraction.AbstractCallType
 
Method Summary
 void answerCall(java.util.Map reasons)
          Answers this Interaction.
 int countOtherPendingInteractions()
          Returns the number of pending interactions for this contact.
 java.lang.String getContactId()
          Returns the ID of this interaction's Contact.
 byte[] getContentBinary()
          Returns the interaction's binary content.
 java.lang.String getContentBinaryMimeType()
          Returns the MIME type that identifies the format of the interaction's binary contents.
 int getContentBinarySize()
          Returns the size of interaction's binary content.
 java.util.Date getDateCreated()
          Returns the date when this Interaction was created.
 Dn getDn()
          Deprecated. since 7.0. Use InteractionVoice.getDn() for voice interactions.
 java.util.Date getEndDate()
          Returns the date when the Interaction processing was over.
 MediaType getMedia()
          Returns the media of this interaction.
 java.lang.String getNotepad()
          Returns the notepad (comment) of this interaction.
 Interaction getParentInteraction()
          Returns the Interaction to which this one replies.
 Place getPlace()
          Returns the Place to which this interaction is bound, or null if no is bound to this interaction.
 java.lang.String getQueue()
          Returns the ID of the queue in which this Interaction currently is.
 Interaction.Status getStatus()
          Returns the current status of this interaction.
 java.lang.String getStructTextMimeType()
          Returns The MIME type of the structured text.
 java.lang.String getStructuredText()
          Returns the structured text of the interaction.
 java.lang.String getSubject()
          Returns the subject of this interaction.
 java.lang.String getText()
          Returns the displayable text of the interaction, without any structure or format information.
 Interaction.Type getType()
          Returns the type of this interaction.
 java.lang.String getUserName()
          Returns the user name of the agent who has processed this interaction.
 boolean isDone()
          Returns true if the Interaction has been marked as terminated.
 void markDone()
          Marks this Interaction as done.
 void merge(java.lang.String contact_id, boolean all)
          Moves this Interaction into the History of another Contact.
 void releaseCall(java.util.Map reasons)
          Releases this Interaction.
 void save()
          Saves this interaction into the Contact Server.
 void setContactId(java.lang.String id)
          Sets the Contact of this Interaction.
 void setContentBinary(byte[] content)
          Sets the interaction's binary content.
 void setContentBinaryMimeType(java.lang.String mime_type)
          Sets the MIME type that identifies the format of the interaction's binary content.
 void setContentBinarySize(int size)
          Sets the size of interaction's binary content.
 void setNotepad(java.lang.String notepad)
          Sets the notepad (comment) of this interaction.
 void setStructTextMimeType(java.lang.String mime_type)
          Sets the MIME type of the StructuredText field.
 void setStructuredText(java.lang.String structured_text)
          Sets the structured text of the interaction.
 void setSubject(java.lang.String subject)
          Sets the subject of this interaction.
 void setText(java.lang.String text)
          Sets the displayable text of the interaction.
 
Methods inherited from interface com.genesyslab.ail.AbstractInteraction
addInteractionListener, getAttachedData, getAttachedData, getAttachedDataEx, getTConnectionId, queryStatus, removeAttachedData, removeInteractionListener, saveAttachedData, setAttachedData, setAttachedData
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.Savable
getContactServerId, isDirty
 

Method Detail

save

void save()
          throws RequestFailedException
Saves this interaction into the Contact Server.

Specified by:
save in interface Savable
Throws:
DatabaseServiceException - if there is a problem with the Contact Server.
RequestFailedException

merge

void merge(java.lang.String contact_id,
           boolean all)
           throws RequestFailedException
Moves this Interaction into the History of another Contact. This is useful if an agent discovers that the Contact whom this Interaction is affected is wrong or exists another time elsewhere in the contact database, the agent may want to merge this Interaction into the History of the correct Contact. The agent may also want to merge all Interactions that were mis-applied to this Contact into the History of the correct Contact.

Note: If the DATABASE service is not available, that is, if Universal Contact Server (UCS) is not connected, do not call this method.

Parameters:
contact_id - the contact. This Interaction must be merged into this contact's History.
all - If true, merges also all the other Interactions of the same source Contact into the History of the contact specified in parameter.
Throws:
RequestFailedException

getDn

Dn getDn()
Deprecated. since 7.0. Use InteractionVoice.getDn() for voice interactions.

Returns the Dn on which this interaction is bound. This method is only valid for voice interactions.

Returns:
null for multimedia interactions.

getStatus

Interaction.Status getStatus()
Returns the current status of this interaction.


getMedia

MediaType getMedia()
Returns the media of this interaction. The regular value is MediaType.VOICE, but on a SIP Server, the media can also be MediaType.CHAT.

Since:
7.6.1

getType

Interaction.Type getType()
Returns the type of this interaction.


countOtherPendingInteractions

int countOtherPendingInteractions()
                                  throws RequestFailedException
Returns the number of pending interactions for this contact. Counts the interactions that are pending for the same contact, except this Interaction.

Note: If the DATABASE service is not available, that is, if Universal Contact Server (UCS) is not connected, do not call this method.

Returns:
the number of other pending interactions.
Throws:
RequestFailedException
Since:
6.5.401.03

getQueue

java.lang.String getQueue()
Returns the ID of the queue in which this Interaction currently is.


isDone

boolean isDone()
               throws RequestFailedException
Returns true if the Interaction has been marked as terminated.

Throws:
RequestFailedException

getDateCreated

java.util.Date getDateCreated()
Returns the date when this Interaction was created.


getEndDate

java.util.Date getEndDate()
Returns the date when the Interaction processing was over. This can be the date when an agent has marked the Interaction as done.


setContactId

void setContactId(java.lang.String id)
                  throws RequestFailedException
Sets the Contact of this Interaction. You should call this method after you have created a new e-mail with Place.createInteraction()

Parameters:
id - The id of the Contact.
Throws:
RequestFailedException

getContactId

java.lang.String getContactId()
Returns the ID of this interaction's Contact. You can get the Contact object with ContactManager.getContact(String)


getUserName

java.lang.String getUserName()
Returns the user name of the agent who has processed this interaction.


getNotepad

java.lang.String getNotepad()
                            throws RequestFailedException
Returns the notepad (comment) of this interaction.

Throws:
RequestFailedException

setNotepad

void setNotepad(java.lang.String notepad)
                throws RequestFailedException
Sets the notepad (comment) of this interaction. The notepad is only seen from inside the Call Center. Call save() to apply this modification.

Throws:
RequestFailedException

getSubject

java.lang.String getSubject()
Returns the subject of this interaction. For an e-mail, it is the subject. For a chat session, it is the chat session summary. For a phone call, it can be can be set by the agent.


setSubject

void setSubject(java.lang.String subject)
                throws RequestFailedException
Sets the subject of this interaction.

Throws:
RequestFailedException

getText

java.lang.String getText()
Returns the displayable text of the interaction, without any structure or format information. For an e-mail, it is the plain text body (if any). For a chat session, it is the text version of the transcript.

See Also:
getStructuredText()

setText

void setText(java.lang.String text)
             throws RequestFailedException
Sets the displayable text of the interaction.

Throws:
RequestFailedException
See Also:
getText()

getStructTextMimeType

java.lang.String getStructTextMimeType()
Returns The MIME type of the structured text. Complies with rules described in the RFC 2046.

See Also:
getStructuredText()

setStructTextMimeType

void setStructTextMimeType(java.lang.String mime_type)
                           throws RequestFailedException
Sets the MIME type of the StructuredText field. Must comply with rules described in the RFC 2046.

Throws:
RequestFailedException
See Also:
setStructuredText(java.lang.String)

getStructuredText

java.lang.String getStructuredText()
Returns the structured text of the interaction. For e-mails where the body is HTML formatted, it is the HTML body. For chat transcript, it's a somehow formatted version of the transcript.

See Also:
getStructTextMimeType()

setStructuredText

void setStructuredText(java.lang.String structured_text)
                       throws RequestFailedException
Sets the structured text of the interaction. For e-mail where the body is HTML formatted, it is the HTML body. For chat transcript, it is a somehow formatted version of the transcript.

Throws:
RequestFailedException
See Also:
setStructTextMimeType(java.lang.String)

answerCall

void answerCall(java.util.Map reasons)
                throws RequestFailedException
Answers this Interaction. This method must be used to answer a call that is in 'RINGING' status and have it switch into 'TALKING' status.

Parameters:
reasons - reasons specified by this agent for answering this Interaction.
Throws:
RequestFailedException

releaseCall

void releaseCall(java.util.Map reasons)
                 throws RequestFailedException
Releases this Interaction.

Parameters:
reasons - reasons specified by this agent for releasing this Interaction.
Throws:
RequestFailedException

markDone

void markDone()
              throws RequestFailedException
Marks this Interaction as done.

Throws:
RequestFailedException

getParentInteraction

Interaction getParentInteraction()
Returns the Interaction to which this one replies. Can be null if this Interaction does not reply to another.

Note: If the DATABASE service is not available, that is, if Universal Contact Server (UCS) is not connected, do not call this method.


getContentBinary

byte[] getContentBinary()
Returns the interaction's binary content.


getContentBinarySize

int getContentBinarySize()
Returns the size of interaction's binary content.

Returns:
the size of interaction's binary contents; or null if the interaction has no binary contents.

getContentBinaryMimeType

java.lang.String getContentBinaryMimeType()
Returns the MIME type that identifies the format of the interaction's binary contents.

Returns:
the MIME type of interaction binary contents (compliant with RFC 2046 standards.)
See Also:
getContentBinary()

setContentBinary

void setContentBinary(byte[] content)
                      throws RequestFailedException
Sets the interaction's binary content. If you set interaction binary contents, specify the associated MIME type and binary size.

Parameters:
content - the byte array of the content.
Throws:
RequestFailedException.
RequestFailedException

setContentBinarySize

void setContentBinarySize(int size)
                          throws RequestFailedException
Sets the size of interaction's binary content.

Parameters:
size - the size of the content.
Throws:
RequestFailedException.
RequestFailedException

setContentBinaryMimeType

void setContentBinaryMimeType(java.lang.String mime_type)
                              throws RequestFailedException
Sets the MIME type that identifies the format of the interaction's binary content.
This MIME type has to be compliant with RFC 2046 standards.
If you set binary contents for this interaction, set this parameter with a non-null value.

Parameters:
mime_type - the MIME type of the content.
Throws:
RequestFailedException.
RequestFailedException

getPlace

Place getPlace()
Returns the Place to which this interaction is bound, or null if no is bound to this interaction.