Class PageSearchable
java.lang.Object
org.ametys.web.frontoffice.search.metamodel.impl.PageSearchable
- All Implemented Interfaces:
PluginAware
,Searchable
,Configurable
,Serviceable
public class PageSearchable
extends Object
implements Searchable, Serviceable, PluginAware, Configurable
Searchable
for Page
s-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
The prefix for the ids of criterion definitionsprotected int
The criteria positionprotected I18nizableText
The labelprotected Returnable
The page returnableprotected AmetysObjectResolver
The ametys object resolverprotected SearchComponentHelper
The search component helper -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildQuery
(AbstractTreeNode<FOSearchCriterion> criterionTree, Map<String, Object> userCriteria, Collection<Returnable> returnables, Collection<Searchable> searchables, AdditionalParameterValueMap additionalParameters, String currentLang, Map<String, Object> contextualParameters) Builds the query of the criterion treevoid
configure
(Configuration configuration) int
The position of the criteria provided by thisSearchable
among criteria provided by otherSearchable
s.getCriteria
(AdditionalParameterValueMap additionalParameterValues) Gets the criteriagetLabel()
Gets the label of the searchablejoinQuery
(Query queryOnCriterion, SearchCriterionDefinition criterion, Collection<Returnable> returnables, AdditionalParameterValueMap additionalParameters) Returns the query which joins the given one (on a criterion) with the given result typesRetrieves the relations the type must have with someReturnable
s.void
service
(ServiceManager manager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.Searchable
additionalServiceParameters
-
Field Details
-
__CRITERION_DEFINITIONS_PREFIX_ID
The prefix for the ids of criterion definitions- See Also:
-
_pageReturnable
The page returnable -
_resolver
The ametys object resolver -
_label
The label -
_criteriaPosition
The criteria position -
_searchComponentHelper
The search component helper
-
-
Constructor Details
-
PageSearchable
public PageSearchable()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
getLabel
Description copied from interface:Searchable
Gets the label of the searchable- Specified by:
getLabel
in interfaceSearchable
- Returns:
- the label of the searchable
-
getCriteria
public Collection<SearchCriterionDefinition> getCriteria(AdditionalParameterValueMap additionalParameterValues) Description copied from interface:Searchable
Gets the criteria- Specified by:
getCriteria
in interfaceSearchable
- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the criteria
-
criteriaPosition
Description copied from interface:Searchable
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.- Specified by:
criteriaPosition
in interfaceSearchable
- Returns:
- The position of the criteria of this
Searchable
-
joinQuery
public Optional<Query> joinQuery(Query queryOnCriterion, SearchCriterionDefinition criterion, Collection<Returnable> returnables, AdditionalParameterValueMap additionalParameters) Description copied from interface:Searchable
Returns the query which joins the given one (on a criterion) with the given result types- Specified by:
joinQuery
in interfaceSearchable
- Parameters:
queryOnCriterion
- The query on the criterion to join fromcriterion
- the criterionreturnables
- The returnables to join toadditionalParameters
- The additional parameters- Returns:
- the joined query
-
relationsWith
Description copied from interface:Searchable
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)- Specified by:
relationsWith
in interfaceSearchable
- Returns:
- some relations the type must have with some
Returnable
s
-
buildQuery
public Query buildQuery(AbstractTreeNode<FOSearchCriterion> criterionTree, Map<String, Object> userCriteria, Collection<Returnable> returnables, Collection<Searchable> searchables, AdditionalParameterValueMap additionalParameters, String currentLang, Map<String, Object> contextualParameters) Description copied from interface:Searchable
Builds the query of the criterion tree- Specified by:
buildQuery
in interfaceSearchable
- Parameters:
criterionTree
- The criterion tree of the service instanceuserCriteria
- The user input criteriareturnables
- The returnables of the service instancesearchables
- The searchables of the service instanceadditionalParameters
- The values of additional parameters of the service instancecurrentLang
- The current langcontextualParameters
- the search contextual parameters.- Returns:
- The query of the criterion tree
-