public interface SearchTemplate
A search template is a configuration tool that supports:
A search template must be registered and declared in the context of a
ModuleSearchRegistrationContext.registerSearchTemplate(Supplier).
After being registered, an instance of a search template can be accessed through its key
using the manager
.
After it is registered, a SearchTemplate
must be configured in the Search
extension of the DMA.
In this extension, the data modeler associates registered search templates to table fields;
these fields constitute the scope of a search template. When an end user searches according to a template,
the search is restricted to the template's scope. Note that a registered but non-configured
SearchTemplate
has no scope: a search using such a template returns no result.
The 'search' extension supports configuring instances of a search strategy
and linking them to a field, in the scope of a template. When searching according to a template,
each scoped field uses its corresponding strategy. If a field has no strategy defined,
it uses the default strategy for its Type
. A field can belong to
multiple search templates. This way, a column can be associated with many search strategies.
The identifier of a search template is used as a parameter in a
Request
using osd:search
XPath function.
See Request.setXPathFilter(String)
Modifier and Type | Method and Description |
---|---|
static SearchTemplateKey |
defaultKey()
Returns a search template key that identifies the default template.
|
SearchTemplateKey |
getTemplateKey()
Returns the identifier of the search template.
|
UserMessage |
getUserDescription()
Returns the description of this template.
|
UserMessage |
getUserLabel()
Returns the label of this template.
|
static SearchTemplateKey defaultKey()
SearchTemplateKey getTemplateKey()
The returned SearchTemplateKey
must contain the current
module name.
Define a public Java constant holding the template key.
UserMessage getUserLabel()
This localized label is used mainly in the Data Model Assistant to display a user-friendly label for this extension.
UserMessage getUserDescription()
This localized description is used mainly in the Data Model Assistant to display a user-friendly label for this extension.