Package io.jmix.search.searching
Class SearchStrategyManager
java.lang.Object
io.jmix.search.searching.SearchStrategyManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final Map<String,
SearchStrategy> -
Constructor Summary
ConstructorDescriptionSearchStrategyManager
(Collection<SearchStrategy> searchStrategies, SearchProperties applicationProperties) -
Method Summary
Modifier and TypeMethodDescriptionfindSearchStrategyByName
(String strategyName) Returns aSearchStrategy
by provided name.Returns all registered search strategies.Gets default search strategy.getSearchStrategyByName
(String strategyName) GetsSearchStrategy
by provided name.
-
Field Details
-
registry
-
defaultStrategyName
-
-
Constructor Details
-
SearchStrategyManager
@Autowired public SearchStrategyManager(Collection<SearchStrategy> searchStrategies, SearchProperties applicationProperties)
-
-
Method Details
-
getSearchStrategyByName
GetsSearchStrategy
by provided name. Throws exception if there is no strategy with such name.- Parameters:
strategyName
- strategy name- Returns:
SearchStrategy
- Throws:
IllegalStateException
- if strategy with provided name not found
-
getDefaultSearchStrategy
Gets default search strategy.- Returns:
SearchStrategy
-
getAllSearchStrategies
Returns all registered search strategies.- Returns:
- all
SearchStrategy
-
findSearchStrategyByName
Returns aSearchStrategy
by provided name. Returns null if there is no strategy with such name.- Parameters:
strategyName
- strategy name- Returns:
SearchStrategy
or null if no strategy was found
-