Interface Returnable
-
- All Known Implementing Classes:
AbstractContentBasedReturnable
,AbstractParameterAdderReturnable
,ContentReturnable
,CourseReturnable
,PageReturnable
,PrivateContentReturnable
,ProgramReturnable
,ResourceReturnable
,UserReturnable
public interface Returnable
Brings a type of objects returned by the search service.
-
-
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
sQuery
filterReturnedDocumentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers, AdditionalParameterValueMap additionalParameterValues)
Returns the query to execute in order to filter returned objects (according to their type) during the search.Collection<FacetDefinition>
getFacets(AdditionalParameterValueMap additionalParameterValues)
Gets the facetsString
getId()
Gets the id of the extensionI18nizableText
getLabel()
Gets the label of the type of resultReturnableSaxer
getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Returns thesaxer
responsible to SAX hits of this Returnable.Collection<SortDefinition>
getSorts(AdditionalParameterValueMap additionalParameterValues)
Gets the sortsdefault Collection<Searchable>
relationsWith()
Retrieves the relations the type must have with someSearchable
s.default boolean
selectedByDefault()
Returnstrue
if the type must be selected by default
-
-
-
Method Detail
-
getLabel
I18nizableText getLabel()
Gets the label of the type of result- Returns:
- the label of the type of result
-
selectedByDefault
default boolean selectedByDefault()
Returnstrue
if the type must be selected by default- Returns:
true
if the type must be selected by default
-
relationsWith
default Collection<Searchable> relationsWith()
Retrieves the relations the type must have with someSearchable
s.
It does not have to be exhaustive (for instance ifSearchable.relationsWith()
declares the relation, it is useless to declare it twice)- Returns:
- some relations the type must have with some
Searchable
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
-
filterReturnedDocumentQuery
Query filterReturnedDocumentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers, AdditionalParameterValueMap additionalParameterValues)
Returns the query to execute in order to filter returned objects (according to their type) during the search.
It should callContextQueriesWrapper#getQuery
in order to make aJoinQuery
on interesting parts ofContextQueriesWrapper
s and then constructs anAndQuery
composed of aDocumentTypeQuery
and the result of the call.- Parameters:
contextQueriesWrappers
- The contextqueries
additionalParameterValues
- The additional parameter values- Returns:
- the query to execute in order to filter returned objects (according to their type) during the search.
-
getSaxer
ReturnableSaxer getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Returns thesaxer
responsible to SAX hits of this Returnable.- Parameters:
allReturnables
- AllReturnable
s (including this)additionalParameterValues
- The additional parameter values- Returns:
- the
saxer
responsible to SAX hits of this Returnable.
-
getFacets
Collection<FacetDefinition> getFacets(AdditionalParameterValueMap additionalParameterValues)
Gets the facets- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the facets
-
getSorts
Collection<SortDefinition> getSorts(AdditionalParameterValueMap additionalParameterValues)
Gets the sorts- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the sorts
-
-