com.genesyslab.ail
Interface CallbackRecord

All Superinterfaces:
IdObject, Possible

public interface CallbackRecord
extends Possible

A callback record that can be associated with a call.


Nested Class Summary
static class CallbackRecord.Action
          Enum for the possible actions on a callback record.
static class CallbackRecord.CallbackOrigin
           
static class CallbackRecord.CallbackStatus
           
static class CallbackRecord.CallbackType
           
static class CallbackRecord.CallResult
          Enum for the possible results of the call handling.
static class CallbackRecord.Reason
          Enum for the possible reasons of the CallbackRecord.Status.
static class CallbackRecord.Status
          Enum for the possible status of a callback record.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 void accept()
          Accepts this record.
 void addCallbackRecordListener(CallbackRecordListener listener)
          Adds a listener.
 void cancel()
          Cancels this record.
 int getAttempts()
          Returns the number of attempts to eliver this callback.
 CallbackRecord.CallbackOrigin getCallbackOrigin()
          Returns the origin of this callback.
 CallbackRecord.CallbackType getCallbackType()
          Returns this callback type.
 CallbackRecord.CallResult getCallResult()
          Gets the current result of the associated call.
 java.lang.String getContact()
          Returns the phone number of the contact that corresponds to this record.
 java.lang.Object getCustomField(java.lang.String name)
          Returns a custom field.
 java.util.Map getCustomFields()
          Gets all the custom fields attached to this record.
 int getEstimatedWaitTime()
          Returns the estimated time that the customer has to wait.
 java.util.Calendar getEstimatedWaitTimeEstimated()
          Returns the date and time at which the estimated wait time has been evaluated.
 InteractionVoice getInteraction()
          Gets the associated call if any, otherwise null.
 CallbackRecord.Reason getReason()
          Gets the reason of the status.
 java.util.Calendar getScheduledDateTime()
          Returns the date and time at which this record is scheduled; null if it is an ASAP callback.
 CallbackRecord.Status getStatus()
          Gets the current status.
 void processed()
          Marks this record as processed, with the current CallbackRecord.CallResult.
 void reject()
          Rejects this record.
 void removeCallbackRecordListener(CallbackRecordListener listener)
          Removes a listener.
 void reschedule(java.util.Calendar cal)
          Reschedules this record.
 void setCallResult(CallbackRecord.CallResult result)
          Sets the result of the associated call.
 void setContact(java.lang.String number)
          Sets the contact phone number.
 void setCustomField(java.lang.String name, java.lang.Object value)
          Modifies or adds a custom field.
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 

Method Detail

accept

void accept()
            throws RequestFailedException
Accepts this record.

Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

reject

void reject()
            throws RequestFailedException
Rejects this record.

Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

cancel

void cancel()
            throws RequestFailedException
Cancels this record.

Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

reschedule

void reschedule(java.util.Calendar cal)
                throws RequestFailedException
Reschedules this record.

Parameters:
cal - The date and time at which this record is rescheduled; null for an ASAP callback.
Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

processed

void processed()
               throws RequestFailedException
Marks this record as processed, with the current CallbackRecord.CallResult.

Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

getAttempts

int getAttempts()
Returns the number of attempts to eliver this callback.


getCallbackType

CallbackRecord.CallbackType getCallbackType()
Returns this callback type.


getCallbackOrigin

CallbackRecord.CallbackOrigin getCallbackOrigin()
Returns the origin of this callback.


getScheduledDateTime

java.util.Calendar getScheduledDateTime()
Returns the date and time at which this record is scheduled; null if it is an ASAP callback.


getEstimatedWaitTime

int getEstimatedWaitTime()
Returns the estimated time that the customer has to wait.

Returns:
the estimated waiting time in seconds.

getEstimatedWaitTimeEstimated

java.util.Calendar getEstimatedWaitTimeEstimated()
Returns the date and time at which the estimated wait time has been evaluated.


getContact

java.lang.String getContact()
Returns the phone number of the contact that corresponds to this record.


setContact

void setContact(java.lang.String number)
Sets the contact phone number.


getCustomFields

java.util.Map getCustomFields()
Gets all the custom fields attached to this record.

Returns:
a map of key-value pairs where the key is a String.

getCustomField

java.lang.Object getCustomField(java.lang.String name)
Returns a custom field.

Parameters:
name - the name of the custom field.

setCustomField

void setCustomField(java.lang.String name,
                    java.lang.Object value)
                    throws RequestFailedException
Modifies or adds a custom field.

Parameters:
name - the name of the custom field.
value - the new value.
Throws:
TelephonyServiceException - if a problem occurred with the T-Server.
RequestFailedException - if the request failed for another reason.

setCallResult

void setCallResult(CallbackRecord.CallResult result)
Sets the result of the associated call.


getCallResult

CallbackRecord.CallResult getCallResult()
Gets the current result of the associated call.


getStatus

CallbackRecord.Status getStatus()
Gets the current status.


getReason

CallbackRecord.Reason getReason()
Gets the reason of the status.


addCallbackRecordListener

void addCallbackRecordListener(CallbackRecordListener listener)
Adds a listener.

Parameters:
listener - a new listener.

removeCallbackRecordListener

void removeCallbackRecordListener(CallbackRecordListener listener)
Removes a listener.

Parameters:
listener - a previously added listener.

getInteraction

InteractionVoice getInteraction()
Gets the associated call if any, otherwise null.