|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Contact
Contact contains information and methods for handling
customer data.
A Contact object is a container. AIL does not keep contact objects in its cache.
Each object reference is unique. AIL
client applications do not deal with the same reference
even though they use the same contact ID (ContactServerID) to retrieve their contact reference
by calling a ContactManager.getContact() method.
Contact instances that handle the same contact ID, may not store
the same contact attribute values according to the ContactManager.getContact() method called.
For instance, if you call the ContactManager.getContact(id) method,
the returned contact has no attribute values. If you call the ContactManager.getContact(ID, collection) method,
the returned instance contains the attribute values specified in the collection parameter.
You can access contact attributes in two ways:
ContactManager predefined methods.ContactManager.getAllContactAttributeMetaData() to get
predefined or customized contact attribute metadatas by invoking getAttributeValues(com.genesyslab.ail.ContactAttributeMetaData, boolean),
removeAttributeValues(com.genesyslab.ail.ContactAttributeMetaData, java.util.Collection) or setAttributeValues(com.genesyslab.ail.ContactAttributeMetaData, java.util.Collection) methods.Note: If the ServiceStatus.Type.DATABASE service is not available (UCS is not connected),
you cannot get features associated with UCS, including interfaces for contacts.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject |
|---|
IdObject.ObjectType |
| Method Summary | |
|---|---|
void |
addEmailAddress(java.lang.String email_address,
java.lang.String description)
Adds an address to this Contact's e-mail
addresses. |
void |
addPhoneNumber(java.lang.String phone_number,
java.lang.String description)
Adds a phone number to this Contact's phone
numbers. |
void |
delete()
Deletes this Contact from the database. |
java.util.Map |
getAllEmailAddresses()
Returns all the e-mail addresses of this Contact as
a Map of (String address,
String description). |
java.util.Map |
getAllPhoneNumbers()
Returns all the phone numbers of this Contact as a
Map of (String phone number,
String description). |
ContactAttributeValue |
getAttributeValue(java.lang.String contactAttributeId)
Returns one attribute value for this ID (ContactServerID). |
java.util.Collection |
getAttributeValues(ContactAttributeMetaData attributeName,
boolean primaryOnly)
Returns all the attribute values for this attributeName. |
java.lang.String |
getFirstName()
Returns the first name of this contact. |
java.lang.String |
getId()
Returns the unique ID of this object. |
java.lang.String |
getLastName()
Returns the last name of this contact. |
MergeContactDetail |
getMergeDetail()
Returns the details for the last merge action performed on this Contact. |
java.lang.String |
getObjectType()
Returns the type of this object. |
java.lang.String |
getPrimaryEmailAddress()
Returns the main e-mail address of this contact. |
java.lang.String |
getPrimaryPhoneNumber()
Returns the main phone number of this contact. |
java.lang.String |
getTitle()
Returns the title (Mr, Mrs...) of this contact . |
boolean |
isUndoAvailable()
Indicates if the undoMerge() method can be called for this Contact. |
void |
merge(java.lang.String from)
Merges all the history from the specified contact into this Contact. |
void |
merge(java.lang.String sourceContactId,
java.lang.String user_name,
java.lang.String reason,
java.lang.String description)
Merges all the history of the source Contact into this
Contact. |
void |
removeAttributeValues(ContactAttributeMetaData attributeName,
java.util.Collection values)
Removes contact attribute values for a ContactAttributeMetaData. |
void |
removeEmailAddress(java.lang.String emailAddress)
Removes an e-mail address from this Contact's e-mail
addresses. |
void |
removePhoneNumber(java.lang.String phone_number)
Removes a number from this Contact's phone
numbers. |
void |
save()
Saves the object into the database. |
java.util.Collection |
setAttributeValues(ContactAttributeMetaData attributeName,
java.util.Collection values)
Adds or updates contact attribute values of this attribute name. |
void |
setFirstName(java.lang.String firstName)
Sets the first name of this Contact. |
void |
setLastName(java.lang.String lastName)
Sets the last name of this Contact. |
void |
setPrimaryEmailAddress(java.lang.String email_address)
Sets this e-mail address as primary. |
void |
setPrimaryPhoneNumber(java.lang.String phone_number)
Sets this phone number as primary. |
void |
setTitle(java.lang.String title)
Sets the title of this Contact. |
void |
undoMerge()
Undoes the last merge action performed on this Contact. |
| Method Detail |
|---|
java.lang.String getId()
AilFactory.
getId in interface IdObjectString.java.lang.String getObjectType()
IdObject.ObjectType.
getObjectType in interface IdObjectString.java.lang.String getTitle()
Stringjava.lang.String getFirstName()
Stringjava.lang.String getLastName()
Stringjava.lang.String getPrimaryEmailAddress()
Stringjava.lang.String getPrimaryPhoneNumber()
String.
java.util.Map getAllEmailAddresses()
throws RequestFailedException
Contact as
a Map of (String address,
String description).
Map of e-mail address as key and description as value.
RequestFailedException - if the service cannot fulfill the request.
java.util.Map getAllPhoneNumbers()
throws RequestFailedException
Contact as a
Map of (String phone number,
String description).
RequestFailedException - if the service cannot fulfill the request.
void merge(java.lang.String from)
throws RequestFailedException
save() to apply
this modification.
The 'from' contact attributes are not deleted, all its contact attribute values are assigned to the 'to' contact with primary status set to false (if needed).
from - the ID of the contact, the interactions of which
must be merged into the history of this contact.
InvalidParameterException - if the parameter is null or invalid.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
void delete()
throws RequestFailedException
Contact from the database. Do not
call save() to apply this modification. If
you call save() on a deleted object, it will be
added back into the database.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
void setFirstName(java.lang.String firstName)
throws RequestFailedException
Contact. Call save() to apply this
modification. Contact
myContact = ...;
myContact.setFirstName("Name");
myContact.save();
firstName - first name as a String.
RequestFailedException - if the service cannot fulfill the request.
void setLastName(java.lang.String lastName)
throws RequestFailedException
Contact. Call save() to apply this
modification.
lastName - last name as a String.
RequestFailedException - if the service cannot fulfill the request.
void setTitle(java.lang.String title)
throws RequestFailedException
Contact. Call save() to apply this
modification.
title - title as a String.
RequestFailedException - if the service cannot fulfill the request.
void addEmailAddress(java.lang.String email_address,
java.lang.String description)
throws RequestFailedException
Contact's e-mail
addresses. Call save() to
apply this modification.
email_address - the e-mail address to add.description - a String comment for this
address.
RequestFailedException - if the service cannot fulfill the request.
void setPrimaryEmailAddress(java.lang.String email_address)
throws RequestFailedException
email_address - the e-mail address to set primary.
RequestFailedException - if the service cannot fulfill the request.
void removeEmailAddress(java.lang.String emailAddress)
throws RequestFailedException
Contact's e-mail
addresses. Call save() to
apply this modification.
emailAddress - the e-mail address to remove.
RequestFailedException - if the service cannot fulfill the request.
void addPhoneNumber(java.lang.String phone_number,
java.lang.String description)
throws RequestFailedException
Contact's phone
numbers. Call save() to apply
this modification. Phone numbers are compared on a digit
basis.
phone_number - the phone number to add.description - a String commenting this phone
number.
RequestFailedException - if the service cannot fulfill the request.
void setPrimaryPhoneNumber(java.lang.String phone_number)
throws RequestFailedException
phone_number - the phone number to set primary.
RequestFailedException - if the service cannot fulfill the request.
void removePhoneNumber(java.lang.String phone_number)
throws RequestFailedException
Contact's phone
numbers. Call save() to apply
this modification.
phone_number - the phone number to remove.
RequestFailedException - if the service cannot fulfill the request.
java.util.Collection setAttributeValues(ContactAttributeMetaData attributeName,
java.util.Collection values)
throws RequestFailedException
ContactAttributeValue is added, updated, the primary
status of all ContactAttributeValues for this ContactAttributeMetaData
are checked. Only one primary value is allowed for a ContactAttributeMetaData.
attributeName - one instance of ContactAttributeMetaDatavalues - a Collection of ContactAttributeValue instances, if attributeId is
null then the value is added, otherwise an update of the given attribute value is done (this
parameter cannot be null).
RequestFailedException - if the service cannot fulfill the request.
void removeAttributeValues(ContactAttributeMetaData attributeName,
java.util.Collection values)
throws RequestFailedException
ContactAttributeMetaData.
Call save() to apply this modification.
attributeName - one instance of ContactAttributeMetaData.values - a Collection of ContactAttributeValue instances (this parameter
cannot be null).
RequestFailedException - if the service cannot fulfill the request.
java.util.Collection getAttributeValues(ContactAttributeMetaData attributeName,
boolean primaryOnly)
throws RequestFailedException
attributeName - one instance of ContactAttributeMetaData.primaryOnly - primary attributes only.
ContactAttributeValue instances.
RequestFailedException - if the service cannot fulfill the request.
ContactAttributeValue getAttributeValue(java.lang.String contactAttributeId)
throws RequestFailedException
contactAttributeId - the ContactServerID of ContactAttributeValue.
RequestFailedException - if the service cannot fulfill the request.
void save()
throws RequestFailedException
InvalidParameterException - if the contact does not exist.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
MergeContactDetail getMergeDetail()
throws RequestFailedException
Contact.
MergeContactDetail instance that contains source and destination information
about the last merge performed on this contact.
InvalidParameterException - if the parameter is null or invalid.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
void merge(java.lang.String sourceContactId,
java.lang.String user_name,
java.lang.String reason,
java.lang.String description)
throws RequestFailedException
Contact into this
Contact. save() to apply
this modification.
sourceContactId - a String value (mandatory),user_name - agent user name as a String value (optional),reason - as String value (optional),description - as String value (optional).
InvalidParameterException - if the parameter is null or invalid.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
void undoMerge()
throws RequestFailedException
Contact.
InvalidParameterException - if the parameter is null or invalid.
DatabaseServiceException - if the database service is out of order.
RequestFailedException - if the service cannot fulfill the request.
boolean isUndoAvailable()
throws RequestFailedException
undoMerge() method can be called for this Contact.
undoMerge capacity is available.
RequestFailedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||