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
Modifier and TypeMethodDescriptiondefault Collection<Configuration>
Retrieves the additional parameters to add to the search service
The ids of the parameters must be unique across allReturnable
s andSearchable
sfilterReturnedDocumentQuery
(Collection<ContextQueriesWrapper> contextQueriesWrappers, AdditionalParameterValueMap additionalParameterValues) Returns the query to execute in order to filter returned objects (according to their type) during the search.getFacets
(AdditionalParameterValueMap additionalParameterValues) Gets the facetsgetId()
Gets the id of the extensiongetLabel()
Gets the label of the type of resultgetSaxer
(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues) Returns thesaxer
responsible to SAX hits of this Returnable.getSorts
(AdditionalParameterValueMap additionalParameterValues) Gets the sortsdefault Collection<Searchable>
Retrieves the relations the type must have with someSearchable
s.default boolean
Returnstrue
if the type must be selected by default
-
Method Details
-
getId
Gets the id of the extension- Returns:
- the id of the extension
-
getLabel
Gets the label of the type of result- Returns:
- the label of the type of result
-
selectedByDefault
Returnstrue
if the type must be selected by default- Returns:
true
if the type must be selected by default
-
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
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
Gets the facets- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the facets
-
getSorts
Gets the sorts- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the sorts
-