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
forPage
s
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
__CRITERION_DEFINITIONS_PREFIX_ID
The prefix for the ids of criterion definitionsprotected int
_criteriaPosition
The criteria positionprotected I18nizableText
_label
The labelprotected Returnable
_pageReturnable
The page returnableprotected AmetysObjectResolver
_resolver
The ametys object resolver
-
Constructor Summary
Constructors Constructor Description PageSearchable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
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 typesCollection<Returnable>
relationsWith()
Retrieves 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 Detail
-
__CRITERION_DEFINITIONS_PREFIX_ID
protected static final String __CRITERION_DEFINITIONS_PREFIX_ID
The prefix for the ids of criterion definitions- See Also:
- Constant Field Values
-
_pageReturnable
protected Returnable _pageReturnable
The page returnable
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver
-
_label
protected I18nizableText _label
The label
-
_criteriaPosition
protected int _criteriaPosition
The criteria position
-
-
Constructor Detail
-
PageSearchable
public PageSearchable()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
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
public I18nizableText 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
public int 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
public Collection<Returnable> 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
-
-