com.genesyslab.ail.srl
Interface SRLManager


public interface SRLManager

The library of StandardResponse. Manager of the Standard Response Library.


Nested Class Summary
static class SRLManager.ResponseType
          This enum lists the possible response types that an agent can work out.
 
Method Summary
 void addSRLListener(SRLListener listener)
          Adds a SRLListener to the listener list for events on SRL updates.
 boolean addStandardResponseFavorite(java.lang.String user_name, java.lang.String standard_response_id)
          Adds a StandardResponse to the favorites of this Agent.
 SearchSRLTemplate createSearchSRLTemplate()
          Creates an empty SearchSRLTemplate instance.
 SearchSRLResult findCategoriesResponsesFromRoots(java.lang.Boolean categoryOnly, SearchSRLTemplate aSearchTemplate)
          Returns the IDs of the StandardResponse and Category instance that belong to the root categories and match the given filter.
 java.util.Collection getCategoriesRoot()
          Returns the Collection of the Category.
 Category getCategory(java.lang.String category_id)
          Returns the Category instance for the given category ID.
 StandardResponse getStandardResponse(java.lang.String standard_response_dbid)
          Returns the StandardResponse instance for the given standard response ID (ContactServerID).
 java.util.Collection getStandardResponseFavoriteIds(java.lang.String user_name)
          Returns the IDs of the StandardResponse of a specific Agent as a Collection of Strings.
 java.util.Collection getStandardResponseFavorites(java.lang.String user_name)
          Returns the StandardResponse of a specific Agent as a Collection of Strings.
 java.util.Collection getStandardResponses(java.lang.String category_id)
          Returns the StandardResponse that belong to the given category.
 void removeSRLListener(SRLListener listener)
          Removes a SRLListener from the listener list for SRL events.
 boolean removeStandardResponseFavorite(java.lang.String user_name, java.lang.String standard_response_id)
          Removes a StandardResponse from the favorites of this Agent.
 void responseUsed(Agent agent, java.lang.String standardResponseId, InteractionMultimedia interaction, SRLManager.ResponseType feedbackType)
          Notifies and qualifies the usage of a standard response.
 java.lang.String[] searchInStandardResponseFavorites(java.lang.String user_name, SearchSRLTemplate aSearchTemplate)
          Returns the IDs of the StandardResponse as a Collection of Strings according to the given filter.
 

Method Detail

addStandardResponseFavorite

boolean addStandardResponseFavorite(java.lang.String user_name,
                                    java.lang.String standard_response_id)
Adds a StandardResponse to the favorites of this Agent.

Parameters:
user_name - the name of the Agent
standard_response_id - the ID of the StandardResponse
Returns:
true if done

removeStandardResponseFavorite

boolean removeStandardResponseFavorite(java.lang.String user_name,
                                       java.lang.String standard_response_id)
Removes a StandardResponse from the favorites of this Agent.

Parameters:
user_name - the name of the Agent
standard_response_id - the ID of the StandardResponse
Returns:
true if done

getStandardResponseFavorites

java.util.Collection getStandardResponseFavorites(java.lang.String user_name)
Returns the StandardResponse of a specific Agent as a Collection of Strings.

Parameters:
user_name - the agent, the responses of whom are requested.
Returns:
Collection a StandardResponse

getStandardResponseFavoriteIds

java.util.Collection getStandardResponseFavoriteIds(java.lang.String user_name)
Returns the IDs of the StandardResponse of a specific Agent as a Collection of Strings.

Parameters:
user_name - the agent, the response IDs of whom are requested.
Returns:
Collection of StandardResponse IDs as String

searchInStandardResponseFavorites

java.lang.String[] searchInStandardResponseFavorites(java.lang.String user_name,
                                                     SearchSRLTemplate aSearchTemplate)
Returns the IDs of the StandardResponse as a Collection of Strings according to the given filter.

Parameters:
user_name - the agent, the response IDs of whom are requested.
aSearchTemplate - a SearchSRLTemplate instance that contains the filter.
Returns:
Collection of StandardResponse IDs as String, empty if not found, null if error.
Since:
7.5

getCategoriesRoot

java.util.Collection getCategoriesRoot()
Returns the Collection of the Category.

Returns:
Collection of Categorys.

getStandardResponses

java.util.Collection getStandardResponses(java.lang.String category_id)
                                          throws RequestFailedException
Returns the StandardResponse that belong to the given category.

Parameters:
category_id - the category ID.
Returns:
Collection of StandardResponses
Throws:
RequestFailedException - if the service cannot fulfill the request.

getCategory

Category getCategory(java.lang.String category_id)
Returns the Category instance for the given category ID.

Parameters:
category_id - the category ID.
Returns:
a category as Category or null.

getStandardResponse

StandardResponse getStandardResponse(java.lang.String standard_response_dbid)
Returns the StandardResponse instance for the given standard response ID (ContactServerID).

Parameters:
standard_response_dbid - the standard response ContactServerID.
Returns:
a standard response as StandardResponse or null

responseUsed

void responseUsed(Agent agent,
                  java.lang.String standardResponseId,
                  InteractionMultimedia interaction,
                  SRLManager.ResponseType feedbackType)
Notifies and qualifies the usage of a standard response.

Parameters:
agent - the concerned Agent
standardResponseId - the ID of the Standard Response
interaction - the concerned InteractionMultimedia
feedbackType - ResponseType value.

findCategoriesResponsesFromRoots

SearchSRLResult findCategoriesResponsesFromRoots(java.lang.Boolean categoryOnly,
                                                 SearchSRLTemplate aSearchTemplate)
Returns the IDs of the StandardResponse and Category instance that belong to the root categories and match the given filter.

Parameters:
categoryOnly -
  • true to search in root categories only
  • false to search in standard responses
  • null, to search in both categories and standard responses.
aSearchTemplate - a SearchSRLTemplate that contains the filter.
Returns:
a SearchSRLResult instance according to the categoryOnly parameter:
Since:
7.5

createSearchSRLTemplate

SearchSRLTemplate createSearchSRLTemplate()
Creates an empty SearchSRLTemplate instance.

Returns:
an empty SearchSRLTemplate instance.
Since:
7.5

addSRLListener

void addSRLListener(SRLListener listener)
Adds a SRLListener to the listener list for events on SRL updates.

Since:
7.5

removeSRLListener

void removeSRLListener(SRLListener listener)
Removes a SRLListener from the listener list for SRL events.

Since:
7.5