Class PrivateContentSearchable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdderSearchable
org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
org.ametys.web.frontoffice.search.metamodel.impl.PrivateContentSearchable
- All Implemented Interfaces:
Cacheable,LogEnabled,PluginAware,Searchable,Disposable,Initializable,Configurable,Contextualizable,Serviceable
This class is a generic searchable to be used to search on a
You must associate it with a
private ContentType.
You must associate it with a
Returnable which is or extends PrivateContentReturnable
<extension point="org.ametys.web.frontoffice.search.metamodel.SearchableExtensionPoint" id="my.searchable.id" class="org.ametys.web.frontoffice.search.metamodel.impl.PrivateContentSearchable"> <label i18n="true">...</label> <criteriaPosition>11</criteriaPosition> <associatedReturnable>my.returnable.id</associatedReturnable> <baseContentType>my.content.type.1</baseContentType> <baseContentType>my.content.type.2</baseContentType> <contentTypeParameter order="99"> <label i18n="true">...</label> <description i18n="true">...</description> </contentTypeParameter> </extension>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.util.Cacheable
Cacheable.SingleCacheConfiguration -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe associated content returnable roleprotected StringThe Avalon role of this Searchableprotected Collection<String>The base private content types of this searchableprotected StringTheprefixfor criterion definitionsprotected StringThe unique name accross the whole application for the parameter for this searchable to select the sub content types.protected StringThe "short version" of the Avalon role of this SearchableFields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_associatedContentReturnable, _contentHelper, _criteriaPosition, _cTypeEP, _id, _label, _pageReturnable, _searchComponentHelperFields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
_manager, _pluginName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_configureAssociatedContentReturnableRole(Configuration configuration) Initializes_associatedContentReturnableRolefield from configurationprotected void_configureBaseContentTypes(Configuration configuration) Initializes_baseContentTypesfield from configurationprotected void_initAvalonRole(Configuration configuration) Initializes_avalonRolefield from configurationprotected voidInitializes_criterionDefinitionPrefixfieldprotected voidInitializes_parameterSubContentTypeUniqueNamefieldprotected voidInitializes_shortAvalonRolefieldprotected StringThe Avalon Role for the associated Content Returnableprotected ConfigurationbuildFinalConfiguration(Configuration initialConfiguration) Builds the final configuration object which will be passed to the superclass, from the "real" XML configurationprotected ConfigurationbuildParametersConfiguration(Configuration initialConfiguration) Builds the configuration object for parametersvoidconfigure(Configuration configuration) protected Collection<String>getContentTypes(AdditionalParameterValueMap additionalParameterValues) Gets the content types which will be used to retrieve the criteria relative to the Indexing Modelprotected StringGets the prefix for criterion definitionsvoidjoinQuery(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 someReturnables.Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_setAssociatedContentReturnable, buildQuery, contextualize, criteriaPosition, dispose, getCacheManager, getCriteria, getIndexingFieldCriterionDefinitionPrefix, getLabel, getManagedCaches, getSystemPropertyCriterionDefinitionPrefix, hasComputableSize, serviceMethods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
additionalServiceParameters, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.util.Cacheable
createCaches, getCache, isCachingEnabled, removeCachesMethods inherited from interface org.ametys.web.frontoffice.search.metamodel.Searchable
additionalServiceParameters
-
Field Details
-
_avalonRole
The Avalon role of this Searchable -
_shortAvalonRole
The "short version" of the Avalon role of this Searchable -
_parameterSubContentTypeUniqueName
The unique name accross the whole application for the parameter for this searchable to select the sub content types. -
_associatedContentReturnableRole
The associated content returnable role -
_criterionDefinitionPrefix
Theprefixfor criterion definitions -
_baseContentTypes
The base private content types of this searchable
-
-
Constructor Details
-
PrivateContentSearchable
public PrivateContentSearchable()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractContentBasedSearchable- Throws:
ConfigurationException
-
buildFinalConfiguration
protected Configuration buildFinalConfiguration(Configuration initialConfiguration) throws ConfigurationException Builds the final configuration object which will be passed to the superclass, from the "real" XML configuration- Parameters:
initialConfiguration- The source configuration- Returns:
- the built configuration object
- Throws:
ConfigurationException- If some values or attributes cannot be retrieved
-
buildParametersConfiguration
protected Configuration buildParametersConfiguration(Configuration initialConfiguration) throws ConfigurationException Builds the configuration object for parameters- Parameters:
initialConfiguration- The source configuration- Returns:
- the configuration object for parameters
- Throws:
ConfigurationException- If some values or attributes cannot be retrieved
-
initialize
- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAbstractContentBasedSearchable- Throws:
Exception
-
associatedContentReturnableRole
Description copied from class:AbstractContentBasedSearchableThe Avalon Role for the associated Content Returnable- Specified by:
associatedContentReturnableRolein classAbstractContentBasedSearchable- Returns:
- The Avalon Role for the associated Content Returnable
-
getCriterionDefinitionPrefix
Description copied from class:AbstractContentBasedSearchableGets the prefix for criterion definitions- Specified by:
getCriterionDefinitionPrefixin classAbstractContentBasedSearchable- Returns:
- the prefix for criterion definitions
-
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- Overrides:
relationsWithin classAbstractContentBasedSearchable- Returns:
- some relations the type must have with some
Returnables
-
getContentTypes
Description copied from class:AbstractContentBasedSearchableGets the content types which will be used to retrieve the criteria relative to the Indexing Model- Specified by:
getContentTypesin classAbstractContentBasedSearchable- Parameters:
additionalParameterValues- The additional parameter values- Returns:
- the content types which will be used to retrieve the criteria relative to the Indexing Model
-
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- Parameters:
queryOnCriterion- The query on the criterion to join fromcriterion- the criterionreturnables- The returnables to join toadditionalParameters- The additional parameters- Returns:
- the joined query
-
_initAvalonRole
Initializes_avalonRolefield from configuration- Parameters:
configuration- The configuration- Throws:
ConfigurationException- If a configuration value cannot be retrieved
-
_initShortAvalonRole
Initializes_shortAvalonRolefield -
_initParameterSubContentTypeUniqueName
Initializes_parameterSubContentTypeUniqueNamefield -
_configureAssociatedContentReturnableRole
protected void _configureAssociatedContentReturnableRole(Configuration configuration) throws ConfigurationException Initializes_associatedContentReturnableRolefield from configuration- Parameters:
configuration- The configuration- Throws:
ConfigurationException- If a configuration value cannot be retrieved
-
_configureBaseContentTypes
protected void _configureBaseContentTypes(Configuration configuration) throws ConfigurationException Initializes_baseContentTypesfield from configuration- Parameters:
configuration- The configuration- Throws:
ConfigurationException- If a configuration value cannot be retrieved
-
_initCriterionDefinitionPrefix
Initializes_criterionDefinitionPrefixfield
-