com.genesyslab.ail.srl
Interface SearchSRLTemplate


public interface SearchSRLTemplate

Defines the template used to search for standard responses.

To get a template instance, call the createSearchSRLTemplate method of the SRLManager, as shown here:

SearchSRLTemplate myTemplate = mSRLManager.createSearchSRLTemplate();

Then, define a search operator and filters by calling the setOperator() and addSearchAttribute() methods. For instance, the following code snippet specifies that you are looking for standard responses which contain the string "my product" in their subject OR in their body; additionally, the result is not case sensitive:

myTemplate.addSearchAttribute(SRLAttribute.SUBJECT,"my product",false);
myTemplate.addSearchAttribute(SRLAttribute.BODY,"my product",false);
myTemplate.setOperator(SRLOperator.OR);

Note: If the DATABASE service is not available, that is, if UCS is not connected, you cannot use features associated with UCS, that is, SRL search.

Since:
7.5
See Also:
SRLManager

Nested Class Summary
static class SearchSRLTemplate.SRLAttribute
          Lists the possible attributes that you can use for a SRL search.
static class SearchSRLTemplate.SRLOperator
          Lists the possible attributes that you can use for a SRL search.
 
Method Summary
 void addSearchAttribute(SearchSRLTemplate.SRLAttribute attribute, java.lang.String searchValue, boolean caseSensitive)
          Adds an attribute value to be searched.
 SearchSRLTemplate.SRLOperator getOperator()
          Returns the operator to be used for the search.
 SearchSRLAttribute[] getSearchAttributes()
          Returns the SearchSRLAttributes of the SRL search filter.
 void removeSearchAttribute(SearchSRLTemplate.SRLAttribute attribute)
          Removes an attribute value to be searched.
 void setOperator(SearchSRLTemplate.SRLOperator operator)
          Sets an operator to be used for the search.
 

Method Detail

getOperator

SearchSRLTemplate.SRLOperator getOperator()
Returns the operator to be used for the search.

setOperator

void setOperator(SearchSRLTemplate.SRLOperator operator)
Sets an operator to be used for the search. SRL operators are:

addSearchAttribute

void addSearchAttribute(SearchSRLTemplate.SRLAttribute attribute,
                        java.lang.String searchValue,
                        boolean caseSensitive)
Adds an attribute value to be searched.

Parameters:
attribute - the attribute type to use for the search.
searchValue - the value searched for this attribute.
caseSensitive - true if the search to be processed is case sensitive.

removeSearchAttribute

void removeSearchAttribute(SearchSRLTemplate.SRLAttribute attribute)
Removes an attribute value to be searched.

Parameters:
attribute - the attribute to be removed.

getSearchAttributes

SearchSRLAttribute[] getSearchAttributes()
Returns the SearchSRLAttributes of the SRL search filter.

Returns:
array of SearchSRLAttribute.