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
SearchableforPages
-
-
Field Summary
Fields Modifier and Type Field Description protected static String__CRITERION_DEFINITIONS_PREFIX_IDThe prefix for the ids of criterion definitionsprotected int_criteriaPositionThe criteria positionprotected I18nizableText_labelThe labelprotected Returnable_pageReturnableThe page returnableprotected AmetysObjectResolver_resolverThe ametys object resolver
-
Constructor Summary
Constructors Constructor Description PageSearchable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)intcriteriaPosition()The position of the criteria provided by thisSearchableamong criteria provided by otherSearchables.Collection<SearchCriterionDefinition>getCriteria(AdditionalParameterValueMap additionalParameterValues)Gets the criteriaI18nizableTextgetLabel()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 someReturnables.voidservice(ServiceManager manager)voidsetPluginInfo(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:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAwareSets 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:
setPluginInfoin 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:SearchableGets the label of the searchable- Specified by:
getLabelin interfaceSearchable- Returns:
- the label of the searchable
-
getCriteria
public Collection<SearchCriterionDefinition> getCriteria(AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:SearchableGets the criteria- Specified by:
getCriteriain interfaceSearchable- Parameters:
additionalParameterValues- The additional parameter values- Returns:
- the criteria
-
criteriaPosition
public int criteriaPosition()
Description copied from interface:SearchableThe position of the criteria provided by thisSearchableamong criteria provided by otherSearchables.
All criteria provided by the sameSearchableare always packed together, this integer just affects the relative position compared to otherSearchablecriteria.
The lowest the integer, the higher it will appear in the UI.- Specified by:
criteriaPositionin 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:SearchableReturns the query which joins the given one (on a criterion) with the given result types- Specified by:
joinQueryin 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:SearchableRetrieves the relations the type must have with someReturnables.
It does not have to be exhaustive (for instance ifReturnable.relationsWith()declares the relation, it is useless to declare it twice)- Specified by:
relationsWithin interfaceSearchable- Returns:
- some relations the type must have with some
Returnables
-
-