com.genesyslab.ail
Interface AilFactory


public interface AilFactory

The main entry point of the Agent Interaction Layer. This class gives you access to the objects of the AIL.

To get an instance of the AilFactory interface, call the AilLoader.getAilFactory() static method, as shown in the following code snippet:
AilFactory myAilFactory = AilLoader.getAilFactory();

Use the AilFactory interface to access the main interfaces for managing agent features, that is, the Agent, Place, and Dn interfaces.
For instance:
Agent exampleAgent = (Agent) myAilFactory.getPerson("my_Agent_ID");

Use the AilFactory interface to get the following services and managers:

For instance:
ContactManager myContactManager = myAilFactory.getContactManager();

Note: If the DATABASE service is not available, that is, if UCS is not connected, you cannot get features associated with UCS, that is, the ContactManager, the SRLManager, the ResourceManager, the InteractionManager and the HistoryManager interfaces.


Method Summary
 boolean addServiceListener(ServiceStatus.Type service_type, ServiceListener listener)
          Adds a listener for the status of the services.
 EmailAddress createEmailAddress(java.lang.String emailAddress)
          Creates an EmailAddress from a string.
 EmailAddress createEmailAddress(java.lang.String personal, java.lang.String address)
          Creates an EmailAddress from two strings.
 EmailAddress[] createEmailAddresses(java.lang.String emailAddresses)
          Creates a table of e-mail addresses from a String.
 java.util.Collection getAbstractDnSummaries(java.lang.String switch_name, AbstractDn.Type type)
          Returns the list of all the DNs of this type on this switch.
 AbstractDnSummary getAbstractDnSummary(java.lang.String id)
          Returns the AbstractDnSummary with this ID on the tenant of the application.
 ActionCodeManager getActionCodeManager()
          Returns the object that manages action codes.
 AgentConfigView getAgentConfigView(java.lang.String agent_id)
          Returns the AgentConfigView with this agent ID.
 AgentGroupSummary getAgentGroupSummary(java.lang.String id)
          Returns the AgentGroupSummary with this ID on the tenant of the application.
 java.util.Collection getAgentSummaries()
          Returns all the existing agents as a Collection of PersonSummary.
 ApplicationInfo getApplicationInfo()
          Returns information about the application currently in use in the Configuration Layer.
 AttachmentManager getAttachmentManager()
          Returns the AttachmentManager.
 ContactManager getContactManager()
          Returns the ContactManager.
 Dn getDn(java.lang.String id)
          Returns the Dn with this ID.
 DnRoutingPoint getDnRoutingPoint(java.lang.String id)
          Returns the DnRoutingPoint with this ID if it exists and the license is OK.
 Enumerator getEnumerator(java.lang.String id)
          Returns the Enumerator with this ID.
 HistoryManager getHistoryManager()
          Returns the HistoryManager.
 IMInteractionContext getIMInteractionContext(InteractionVoice interaction)
          Returns the Instant Messaging Context associated with this interaction.
 EmailAddress getIncomingAddress(java.lang.String mailbox)
          Returns the e-mail address through which incoming e-mails may reach this contact center according to their mailbox
 java.util.Collection getIncomingAddresses()
          Returns the e-mail addresses through which incoming e-mails may reach this contact center.
 Interaction getInteraction(java.lang.String id)
          Returns the interaction with this ID.
 Interaction getInteractionArchive(java.lang.String archive_id)
          Returns the interaction with this DBID in the Contact Server Archive database, if such an interaction exists.
 InteractionManager getInteractionManager()
          Returns the InteractionManager.
 KwService getKwService()
          Returns a Knowledge Worker Service for additional functionalities.
 java.util.Collection getLoggedAgents()
          Returns the Agents currently logged in this AIL.
 java.util.Map getLoggedDns()
          Returns the DNs currently logged in this AIL.
 Monitor getMonitor()
          Returns the Monitor instance which provides real-time information such as agent status.
 Person getPerson(java.lang.String user_name)
          Returns the Person with this user name.
 java.lang.String getPersonNameFromLoginID(java.lang.String loginID, java.lang.String switchName)
          Returns the user name of a Person from a login ID on a switch.
 PersonSummary getPersonSummary(java.lang.String id)
          Returns the PersonSummary with this ID on the tenant of the application.
 Place getPlace(java.lang.String id)
          Returns the Place with this ID.
 PlaceSummary getPlaceSummary(java.lang.String id)
          Returns the PlaceSummary with this ID on the tenant of the application.
 Queue getQueue(java.lang.String id)
          Returns the Queue with this ID on the tenant of the application.
 ResourceManager getResourceManager()
          Returns the Resource Manager.
 RoutingInteraction getRoutingInteraction(java.lang.String id)
          Returns the RoutingInteraction with this ID.
 DnRoutingPoint getRoutingPoint(java.lang.String id)
          Returns the DnRoutingPoint with this ID if it exists and the license is OK.
 java.util.Map getServices()
          Returns all the services on which the AIL relies.
 java.util.Map getServices(ServiceStatus.Type service_type)
          Returns all the services of this type as a Map of (String service name, ServiceStatus).
 SkillSummary getSkillSummary(java.lang.String id)
          Returns the SkillSummary with this ID on the tenant of the application.
 SRLManager getSRLManager()
          Returns the manager for the Standard Response Library.
 Switch getSwitch(java.lang.String name)
          Returns the Switch with this name.
 java.util.Map getTimeZones()
          Returns all the time zones defined in the Configuration Layer.
 WorkbinSummary getWorkbinSummary(java.lang.String id)
          Returns the WorkbinSummary with this ID on the tenant of the application.
 AbstractInteraction lookupInteraction(java.lang.String dn, java.lang.String connId)
          Returns the AbstractInteraction with these parameters, or null if not found.
 void removeServiceListener(ServiceStatus.Type service_type, ServiceListener listener)
          Removes a listener for the status of the services of a given type.
 void setLogFileOptions(java.lang.String _option)
          Sets options for the log file.
 

Method Detail

getSwitch

Switch getSwitch(java.lang.String name)
Returns the Switch with this name.


getActionCodeManager

ActionCodeManager getActionCodeManager()
Returns the object that manages action codes. The ActionCodeManager gives you access to the ActionCodes.


getAbstractDnSummaries

java.util.Collection getAbstractDnSummaries(java.lang.String switch_name,
                                            AbstractDn.Type type)
Returns the list of all the DNs of this type on this switch. They are returned as a Collection of AbstractDnSummary. The AbstractDnSummaries of type VIRTUAL_ROUTING_POINT, ROUTING_POINT or QUEUE, can be used in InteractionVoice.singleStepTransfer(java.lang.String, java.lang.String, java.lang.String, java.util.Map).

Parameters:
switch_name - the name of the switch.
type - the type of DN that is required.
Returns:
the DNs of this type on this switch.

getAgentSummaries

java.util.Collection getAgentSummaries()
Returns all the existing agents as a Collection of PersonSummary. You can get the Person object from its name with PersonSummary.getPerson().

Returns:
the names of all the agents.

getLoggedDns

java.util.Map getLoggedDns()
Returns the DNs currently logged in this AIL. The returned object is a Map of (String DN, String agent_name) containing the Dns that were logged through this AilFactory and the user name of the agent. The map is empty if no DN was logged through this AIL.

Returns:
the Dns currently logged in this instance of the AIL

getLoggedAgents

java.util.Collection getLoggedAgents()
Returns the Agents currently logged in this AIL. The returned object is a Collection of String representing the user names of the logged agents. The collection is empty if no agent has logged through this AIL.

Returns:
the Agents currently logged in this instance of the AIL.

getPerson

Person getPerson(java.lang.String user_name)
Returns the Person with this user name. Returns null if there is no Person with this user name.

Parameters:
user_name - the user name of the person (also called ID)
Returns:
the Person with this user name, or null.

getPersonNameFromLoginID

java.lang.String getPersonNameFromLoginID(java.lang.String loginID,
                                          java.lang.String switchName)
Returns the user name of a Person from a login ID on a switch.

Parameters:
loginID - a login ID on a switch.
switchName - the switch name. Can be null if the login ID is unique in the Configuration Layer.
Returns:
the user name that can be used with getPerson(java.lang.String); otherwise, null if no user name could be found or if more than one user name was found.

getPlace

Place getPlace(java.lang.String id)
Returns the Place with this ID. Returns null if no Place with this ID exists.

Parameters:
id - the ID of the Place. It is called 'name' in the Configuration Layer.
Returns:
the Place with this ID, or null.

getDn

Dn getDn(java.lang.String id)
Returns the Dn with this ID. Returns null if no Dn with this ID exists. The returned DN is always registered to the T-Server.

Parameters:
id - the ID of the Dn. This ID is formatted as [number]@[switch name], which is what Dn.getId() returns.
Returns:
the Dn with this ID, or null

getDnRoutingPoint

DnRoutingPoint getDnRoutingPoint(java.lang.String id)
Returns the DnRoutingPoint with this ID if it exists and the license is OK. The returned DnRoutingPoint is always registered to the T-Server.

Parameters:
id - the ID of the DnRoutingPoint. (see getDn(java.lang.String))
Returns:
the DnRoutingPoint if the ID and the license are correct, otherwise null.

getRoutingPoint

DnRoutingPoint getRoutingPoint(java.lang.String id)
                               throws RequestFailedException
Returns the DnRoutingPoint with this ID if it exists and the license is OK.

Returns:
the DnRoutingPoint with this ID, or null if it was not found.
Throws:
RequestFailedException - in case of license problem

getInteraction

Interaction getInteraction(java.lang.String id)
                           throws RequestFailedException
Returns the interaction with this ID.

Parameters:
id - the ID of the Interaction in AIL.
Returns:
the Interaction with this ID, or null if it was not found.
Throws:
RequestFailedException - in case of license problem

getInteractionArchive

Interaction getInteractionArchive(java.lang.String archive_id)
                                  throws RequestFailedException
Returns the interaction with this DBID in the Contact Server Archive database, if such an interaction exists.

Parameters:
archive_id - the Interaction ID in the Contact Server Archive database. Also called DBID.
Returns:
the Interaction with this DBID; or null if no interaction was found.
Throws:
RequestFailedException - exception thrown in case of a license problem.
See Also:
HistoryManager

getRoutingInteraction

RoutingInteraction getRoutingInteraction(java.lang.String id)
                                         throws RequestFailedException
Returns the RoutingInteraction with this ID.

Parameters:
id - the ID of the RoutingInteraction in AIL.
Returns:
the RoutingInteraction with this ID, or null if it does not exist.
Throws:
RequestFailedException

lookupInteraction

AbstractInteraction lookupInteraction(java.lang.String dn,
                                      java.lang.String connId)
                                      throws RequestFailedException
Returns the AbstractInteraction with these parameters, or null if not found.

Parameters:
dn - the full directory number (number@switch).
connId - the connection Id.
Returns:
the AbstractInteraction with this connId
Throws:
RequestFailedException

getIncomingAddresses

java.util.Collection getIncomingAddresses()
                                          throws ConfigServiceException
Returns the e-mail addresses through which incoming e-mails may reach this contact center. This information comes from the E-mail Server applications in the Configuration Layer.

Returns:
the incoming addresses as a collection of EmailAddress, or null if this application has no connection to the config server.
Throws:
ConfigServiceException - if there is a problem with the Configuration Layer.

getIncomingAddress

EmailAddress getIncomingAddress(java.lang.String mailbox)
                                throws ConfigServiceException
Returns the e-mail address through which incoming e-mails may reach this contact center according to their mailbox

Throws:
ConfigServiceException
Since:
7.6.4
See Also:
InteractionMailIn.getMailbox()

getSRLManager

SRLManager getSRLManager()
Returns the manager for the Standard Response Library. The SRLManager allows you to see all StandardResponses by category, and manage the favorite StandardResponses.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.

Returns:
the Standard Response Library Manager.

getEnumerator

Enumerator getEnumerator(java.lang.String id)
Returns the Enumerator with this ID. Returns null if no Enumerator with this ID exists.

Parameters:
id - the ID of the Enumerator.
Returns:
the Enumerator with this ID, or null.

getServices

java.util.Map getServices()
Returns all the services on which the AIL relies. They are returned as a Map of (String service name, ServiceStatus). This Map includes unavailable services.

Returns:
a Map containing all services and their statuses.

getServices

java.util.Map getServices(ServiceStatus.Type service_type)
Returns all the services of this type as a Map of (String service name, ServiceStatus). This Map includes unavailable services.

Parameters:
service_type - the type of service to return. Use null to get all services at once.

addServiceListener

boolean addServiceListener(ServiceStatus.Type service_type,
                           ServiceListener listener)
Adds a listener for the status of the services.

Parameters:
service_type - the type of service to listen. Use null to register all services at once.
listener - the listener to register.
Returns:
true if there is at least one service of this type, otherwise false.

removeServiceListener

void removeServiceListener(ServiceStatus.Type service_type,
                           ServiceListener listener)
Removes a listener for the status of the services of a given type.

Parameters:
service_type - the type of services to stop listening. Use null to unregister from all services at once.
listener - the listener to unregister.

createEmailAddress

EmailAddress createEmailAddress(java.lang.String personal,
                                java.lang.String address)
Creates an EmailAddress from two strings.

Parameters:
personal - the personal part of the e-mail address. It must be compliant with the recommendations of the RFC 822.
address - the address. It must be compliant with the recommendations of the RFC 822.

createEmailAddress

EmailAddress createEmailAddress(java.lang.String emailAddress)
                                throws RequestFailedException
Creates an EmailAddress from a string.

Parameters:
emailAddress - the address that will be created. It may contain a personal part according to the recommendations of the RFC 822
Throws:
InvalidParameterException - if the parameter is not an e-mail address.
RequestFailedException

createEmailAddresses

EmailAddress[] createEmailAddresses(java.lang.String emailAddresses)
                                    throws RequestFailedException
Creates a table of e-mail addresses from a String.

Parameters:
emailAddresses - a String representation of the addresses. As specified in the recommendation of the RFC 822, the different addresses must be separated by commas.
Throws:
InvalidParameterException - if the parameter is not a list of e-mail addresses.
RequestFailedException

getApplicationInfo

ApplicationInfo getApplicationInfo()
Returns information about the application currently in use in the Configuration Layer. These information include the options of this application in the Configuration Layer.

Returns:
an ApplicationInfo object with info about this application.

getKwService

KwService getKwService()
Returns a Knowledge Worker Service for additional functionalities.


getContactManager

ContactManager getContactManager()
Returns the ContactManager. The ContactManager offers the possibility to search, create, and modify contacts.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.


getResourceManager

ResourceManager getResourceManager()
Returns the Resource Manager. The ResourceManager can be used to manage an agent's personal data.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.


getInteractionManager

InteractionManager getInteractionManager()
Returns the InteractionManager. The InteractionManager namely gives access to InteractionAttributeMetaData and CustomAttachedData.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.


getHistoryManager

HistoryManager getHistoryManager()
Returns the HistoryManager. The HistoryManager gives access to the history of a contact.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.


getAttachmentManager

AttachmentManager getAttachmentManager()
Returns the AttachmentManager. The AttachmentManager gives access to the management of attachment files of SRL, Interaction and so on.

Note: If the DATABASE service is not available, that is, if UCS is not connected, do not call this method.

Since:
7.5

setLogFileOptions

void setLogFileOptions(java.lang.String _option)
Sets options for the log file. Calling this method overrides any log options defined for this application in the Configuration Layer.

Use the same syntax than for setting the "file" option of the "log" section defined for this application in the Configuration Layer. The syntax is " level, file_name, file_size, file_number [,zip] ", where:

If you do not specify a "log/file" option in your application template, the created log files will be named according to the following rule: "file name"."date"_"time"[.i].log[.zip]

Parameters:
_option - a String defining options to be set.

getMonitor

Monitor getMonitor()
Returns the Monitor instance which provides real-time information such as agent status.

Returns:
a Monitor object or null if there is no connection to Statistics Server.

getAgentConfigView

AgentConfigView getAgentConfigView(java.lang.String agent_id)
                                   throws RequestFailedException
Returns the AgentConfigView with this agent ID. If agent_id is null, returns an AgentConfigView with the rights of the application. In SERVER mode, the rights of the application are defined in LogOnAs section ; in CLIENT mode, it is the rights of the user provided at startup.

Throws:
RequestFailedException

getAbstractDnSummary

AbstractDnSummary getAbstractDnSummary(java.lang.String id)
                                       throws RequestFailedException
Returns the AbstractDnSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getAgentGroupSummary

AgentGroupSummary getAgentGroupSummary(java.lang.String id)
                                       throws RequestFailedException
Returns the AgentGroupSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getPersonSummary

PersonSummary getPersonSummary(java.lang.String id)
                               throws RequestFailedException
Returns the PersonSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getPlaceSummary

PlaceSummary getPlaceSummary(java.lang.String id)
                             throws RequestFailedException
Returns the PlaceSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getSkillSummary

SkillSummary getSkillSummary(java.lang.String id)
                             throws RequestFailedException
Returns the SkillSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getQueue

Queue getQueue(java.lang.String id)
               throws RequestFailedException
Returns the Queue with this ID on the tenant of the application.

Throws:
RequestFailedException

getWorkbinSummary

WorkbinSummary getWorkbinSummary(java.lang.String id)
                                 throws RequestFailedException
Returns the WorkbinSummary with this ID on the tenant of the application.

Throws:
RequestFailedException

getTimeZones

java.util.Map getTimeZones()
Returns all the time zones defined in the Configuration Layer.

Returns:
a Map of String: ID -> java.util.TimeZone.

getIMInteractionContext

IMInteractionContext getIMInteractionContext(InteractionVoice interaction)
Returns the Instant Messaging Context associated with this interaction. Creates an IM Context if necessary. Returns null if the interaction is not on an IM-enabled switch.