public class SearchFacadeClient extends AbstractSearchFacadeClient
This class provides common methods that this and other utility class to the Search facade can use. This class also provides a set of convenient Java API to represent particular Search operations. This set of Java API also include APIs for Web based requests to transform the name value pair request into the appropriate request documents.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
CHANGE_VERB_ACTION_ADD, CHANGE_VERB_ACTION_CHANGE, CHANGE_VERB_ACTION_CREATE, CHANGE_VERB_ACTION_DELETE, CHANGE_VERB_ACTION_UPDATE
Constructor and Description |
---|
SearchFacadeClient()
Creates an instance of the client to communicate with the Search facade.
|
SearchFacadeClient(BusinessContextType businessContext,
javax.security.auth.callback.CallbackHandler callbackHandler)
Creates an instance of the client to communicate with the Search facade.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLandingPage(java.lang.String astrSearchTerm,
java.lang.String astrLanguageId,
java.lang.String astrStoreId)
This method returns a list of landing pages for the specified search term
based on the specified language and the store path in the context.
|
java.util.Map<java.lang.String,java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>> |
getSearchTermAssociationsToPublish(boolean bCaseInsensitive)
This method returns a map of Search Term Associations to be published for
the store.
|
java.util.List<java.lang.String> |
getSynonyms(java.lang.String astrSearchTerm,
java.lang.String astrLanguageId)
This method returns a list of synonyms for the specified search term
based on the specified language and the store path in the context.
|
java.util.Set<java.lang.String> |
getSynonymsWithReplacement(java.lang.String searchTerm,
java.lang.String languageIds)
Get synonyms by search term under specific languages.
|
java.util.Set<java.lang.String> |
getSynonymsWithReplacement(java.lang.String searchTerm,
java.lang.String languageIds,
java.lang.Integer threshold)
Get synonyms by search term under specific languages.
|
changeSearchTermAssociation, getSearchTermAssociation, getSearchTermAssociation, getSearchTermAssociation, processSearchTermAssociation
createActionExpression, createChangeVerb, createGetVerb, createGetVerb, createProcessVerb, createSyncVerb
public static final java.lang.String COPYRIGHT
public SearchFacadeClient()
public SearchFacadeClient(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
businessContext
- The default business context to associate with the messages
when making requests.callbackHandler
- Used for authentication purposes so the controller can give
the authentication information to the transport when required.public java.util.List<java.lang.String> getSynonyms(java.lang.String astrSearchTerm, java.lang.String astrLanguageId) throws SearchTermAssociationException
This method returns a list of synonyms for the specified search term based on the specified language and the store path in the context. The comparison to see if synonyms are defined for the specified search term is case-insensitive.
astrSearchTerm
- The search term. Escape characters for any single quotes are
added to the search term in this method.astrLanguageId
- The language ID where the synonyms are defined, for example
"-1" is used for "en_US".SearchTermAssociationException
- if an error occurs.public java.lang.String getLandingPage(java.lang.String astrSearchTerm, java.lang.String astrLanguageId, java.lang.String astrStoreId) throws SearchTermAssociationException
This method returns a list of landing pages for the specified search term based on the specified language and the store path in the context.
astrSearchTerm
- The search term. Escape characters for any single quotes are
added to the search term in this method.astrLanguageId
- The language ID where the synonyms are defined, for example
"-1" is used for "en_US".astrStoreId
- The store ID where the synonyms are defined.SearchTermAssociationException
- if an error occurs.public java.util.Map<java.lang.String,java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>> getSearchTermAssociationsToPublish(boolean bCaseInsensitive) throws SearchTermAssociationException
bCaseInsensitive
- Boolean that indicates if the search terms should be converted
to lower case.SearchTermAssociationException
- if an error occurs.public java.util.Set<java.lang.String> getSynonymsWithReplacement(java.lang.String searchTerm, java.lang.String languageIds) throws SearchTermAssociationException
Note that not only the STA synonyms 'Synonym' will be returned, the STA replacement, 'AlsoSearchFor' and 'SearchForInstead', are also handled and merged with STA synonyms as a result set by this method.
searchTerm
- a search term.languageIds
- a string of language IDs separated by ','.SearchTermAssociationException
- exception could be thrown when errors occurred during STA
service invocation.public java.util.Set<java.lang.String> getSynonymsWithReplacement(java.lang.String searchTerm, java.lang.String languageIds, java.lang.Integer threshold) throws SearchTermAssociationException
Note that not only the STA synonyms 'Synonym' will be returned, the STA replacement, 'AlsoSearchFor' and 'SearchForInstead', are also handled and merged with STA synonyms as a result set by this method.
searchTerm
- a search term.languageIds
- a string of language IDs separated by ','.threshold
- a limit for restricting the maximum number of synonyms to be
returned.SearchTermAssociationException
- exception could be thrown when errors occurred during STA
service invocation.