Interface Searchable
-
- All Known Implementing Classes:
AbstractContentBasedSearchable
,AbstractParameterAdderSearchable
,ContentSearchable
,CourseSearchable
,PageSearchable
,PrivateContentSearchable
,ProgramSearchable
,ResourceSearchable
public interface Searchable
Brings a set of criteria, facets, sorts on a type of objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Collection<Configuration>
additionalServiceParameters()
Retrieves the additional parameters to add to the search service
The ids of the parameters must be unique across allReturnable
s andSearchable
sdefault int
criteriaPosition()
The position of the criteria provided by thisSearchable
among criteria provided by otherSearchable
s.Collection<SearchCriterionDefinition>
getCriteria(AdditionalParameterValueMap additionalParameterValues)
Gets the criteriaI18nizableText
getLabel()
Gets the label of the searchableOptional<Query>
joinQuery(Query queryOnCriterion, SearchCriterionDefinition criterion, Collection<Returnable> returnables, AdditionalParameterValueMap additionalParameters)
Returns the query which joins the given one (on a criterion) with the given result typesdefault Collection<Returnable>
relationsWith()
Retrieves the relations the type must have with someReturnable
s.
-
-
-
Method Detail
-
getLabel
I18nizableText getLabel()
Gets the label of the searchable- Returns:
- the label of the searchable
-
relationsWith
default Collection<Returnable> relationsWith()
Retrieves the relations the type must have with someReturnable
s.
It does not have to be exhaustive (for instance ifReturnable.relationsWith()
declares the relation, it is useless to declare it twice)- Returns:
- some relations the type must have with some
Returnable
s
-
additionalServiceParameters
default Collection<Configuration> additionalServiceParameters()
Retrieves the additional parameters to add to the search service
The ids of the parameters must be unique across allReturnable
s andSearchable
s- Returns:
- some additional parameters to add to the search service
-
getCriteria
Collection<SearchCriterionDefinition> getCriteria(AdditionalParameterValueMap additionalParameterValues)
Gets the criteria- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the criteria
-
criteriaPosition
default int criteriaPosition()
The position of the criteria provided by thisSearchable
among criteria provided by otherSearchable
s.
All criteria provided by the sameSearchable
are always packed together, this integer just affects the relative position compared to otherSearchable
criteria.
The lowest the integer, the higher it will appear in the UI.- Returns:
- The position of the criteria of this
Searchable
-
joinQuery
Optional<Query> joinQuery(Query queryOnCriterion, SearchCriterionDefinition criterion, Collection<Returnable> returnables, AdditionalParameterValueMap additionalParameters)
Returns the query which joins the given one (on a criterion) with the given result types- Parameters:
queryOnCriterion
- The query on the criterion to join fromcriterion
- the criterionreturnables
- The returnables to join toadditionalParameters
- The additional parameters- Returns:
- the joined query
-
-