public interface ModuleSearchRegistrationContext
ModuleRegistration.handleSearchRegistration(ModuleSearchRegistrationContext)| Modifier and Type | Method and Description | 
|---|---|
| String | getModuleName()Returns the current module name. | 
| ModuleSearchRegistrationContext | registerSearchTemplate(Supplier<SearchTemplate> aSearchTemplate)Registers a new search template supplier. | 
| ModuleSearchRegistrationContext | registerStopWords(StopWordsDeclaration aDeclaration,
                 List<String> stopWords)Registers a new list of stop words under a given declaration. | 
| ModuleSearchRegistrationContext | registerSynonyms(SynonymDeclaration aDeclaration,
                List<SynonymPair> someSynonyms)Registers a new list of synonyms under a given declaration. | 
String getModuleName()
ModuleSearchRegistrationContext registerSearchTemplate(Supplier<SearchTemplate> aSearchTemplate)
 Configure the template in the
 Search extension in the DMA.
 
IllegalArgumentException - if:
                                  null.template .SearchTemplateModuleSearchRegistrationContext registerStopWords(StopWordsDeclaration aDeclaration, List<String> stopWords)
A field-level search strategy like 'Name' or 'Text' can be parameterized with a stop word list. All the words in the list are then ignored when searching. Tuning a search strategy with the appropriate stop words helps with performance and relevancy of the search.
 Use the key in the declaration when configuring a custom field-level
 search strategy in the Search extension of the data model assistant.
 Then select a compatible field, and assign the new search strategy in the 'Extensions' tab.
 
 In the implementation of
 ModuleRegistration.handleSearchRegistration(ModuleSearchRegistrationContext):
 
 StopWordsDeclaration decl = StopWordsDeclaration.of(
        StopWordsKey.parse("myModuleName@stopWordsList"),
        UserMessage.createInfo("a label"),
        UserMessage.createInfo("a description"));
 aContext.registerStopWords(addressStopWordsDeclaration, Arrays.asList("sw1", "sw2"));
 IllegalArgumentException - if:
                                  null.ModuleSearchRegistrationContext registerSynonyms(SynonymDeclaration aDeclaration, List<SynonymPair> someSynonyms)
A field-level search strategy like 'Name' or 'Text' can be parameterized with a synonyms list. Each pair of words in the list are then considered the same when searching.
 Use the key in the declaration when configuring a custom field-level
 search strategy in the Search extension of the data model assistant.
 Then select a compatible field, and assign the new search strategy in the 'Extensions' tab.
 
 In the implementation of
 ModuleRegistration.handleSearchRegistration(ModuleSearchRegistrationContext):
 
 SynonymDeclaration decl = SynonymDeclaration.of(SynonymsKey.parse("myModuleName@synonymsList"),
        UserMessage.createInfo("a label"),
        UserMessage.createInfo("a description"));
 List someSynonyms = Arrays.asList(
        SynonymPair.newPair("Mike", "Michael"),
        SynonymPair.newPair("Joseph", "Joe"));
 aContext.registerSynonyms(decl, someSynonyms);
  IllegalArgumentException - if:
                                  null.