Class ProgramSearchable
- 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.plugins.odfweb.service.search.ProgramSearchable
-
- All Implemented Interfaces:
LogEnabled
,PluginAware
,Searchable
,Disposable
,Initializable
,Configurable
,Contextualizable
,Serviceable
public class ProgramSearchable extends AbstractContentBasedSearchable
Searchable
forProgram
s
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ProgramSearchable.ProgramThroughProgramPartsQuery
AQuery
that returns Programs, by querying their child ProgramParts
-
Field Summary
Fields Modifier and Type Field Description private static String
__CRITERION_DEFINITIONS_PREFIX_ID
static String
PARAMETER_SEARCH_ON_SUBPROGRAMS
The additional parameter for indicating if search has to be made also on subprogramsstatic String
ROLE
Avalon Role-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_associatedContentReturnable, _criteriaPosition, _cTypeEP, _label, _pageReturnable
-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
_manager, _pluginName
-
-
Constructor Summary
Constructors Constructor Description ProgramSearchable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
_searchOnSubprograms(AdditionalParameterValueMap additionalParameters)
protected boolean
appliesToSubprogram(Query queryOnCriterion)
Determines if the givenQuery
applies to Subprogramsprotected String
associatedContentReturnableRole()
The Avalon Role for the associated Content Returnableprotected Collection<String>
getContentTypes(AdditionalParameterValueMap additionalParameterValues)
Gets the content types which will be used to retrieve the criteria relative to the Indexing Modelprotected String
getCriterionDefinitionPrefix()
Gets the prefix for criterion definitionsprotected Query
getProgramThroughSubprogramsQuery(Query queryOnCriterion)
Gets theQuery
that returns Programs by querying their SubProgramsOptional<Query>
joinQuery(Query queryOnCriterion, 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.-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_setAssociatedContentReturnable, configure, contextualize, criteriaPosition, dispose, getCriteria, getIndexingFieldCriterionDefinitionPrefix, getLabel, getSystemPropertyCriterionDefinitionPrefix, initialize, service
-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
additionalServiceParameters, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
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
-
PARAMETER_SEARCH_ON_SUBPROGRAMS
public static final String PARAMETER_SEARCH_ON_SUBPROGRAMS
The additional parameter for indicating if search has to be made also on subprograms- See Also:
- Constant Field Values
-
__CRITERION_DEFINITIONS_PREFIX_ID
private static final String __CRITERION_DEFINITIONS_PREFIX_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProgramSearchable
public ProgramSearchable()
-
-
Method Detail
-
associatedContentReturnableRole
protected String associatedContentReturnableRole()
Description copied from class:AbstractContentBasedSearchable
The Avalon Role for the associated Content Returnable- Specified by:
associatedContentReturnableRole
in classAbstractContentBasedSearchable
- Returns:
- The Avalon Role for the associated Content Returnable
-
getCriterionDefinitionPrefix
protected String getCriterionDefinitionPrefix()
Description copied from class:AbstractContentBasedSearchable
Gets the prefix for criterion definitions- Specified by:
getCriterionDefinitionPrefix
in classAbstractContentBasedSearchable
- Returns:
- the prefix for criterion definitions
-
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
- Overrides:
relationsWith
in classAbstractContentBasedSearchable
- Returns:
- some relations the type must have with some
Returnable
s
-
getContentTypes
protected Collection<String> getContentTypes(AdditionalParameterValueMap additionalParameterValues)
Description copied from class:AbstractContentBasedSearchable
Gets the content types which will be used to retrieve the criteria relative to the Indexing Model- Specified by:
getContentTypes
in 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, 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- Parameters:
queryOnCriterion
- The query on the criterion to join fromreturnables
- The returnables to join toadditionalParameters
- The additional parameters- Returns:
- the joined query
-
_searchOnSubprograms
private boolean _searchOnSubprograms(AdditionalParameterValueMap additionalParameters)
-
appliesToSubprogram
protected boolean appliesToSubprogram(Query queryOnCriterion)
Determines if the givenQuery
applies to Subprograms- Parameters:
queryOnCriterion
- The query- Returns:
true
if the givenQuery
applies to Subprograms
-
getProgramThroughSubprogramsQuery
protected Query getProgramThroughSubprogramsQuery(Query queryOnCriterion)
Gets theQuery
that returns Programs by querying their SubPrograms- Parameters:
queryOnCriterion
- The query on SubPrograms- Returns:
- The
Query
that returns Programs
-
-