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:
Cacheable,LogEnabled,PluginAware,Searchable,Disposable,Initializable,Configurable,Contextualizable,Serviceable
public class ProgramSearchable extends AbstractContentBasedSearchable
SearchableforPrograms
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classProgramSearchable.ProgramThroughProgramPartsQueryAQuerythat returns Programs, by querying their child ProgramParts-
Nested classes/interfaces inherited from interface org.ametys.core.util.Cacheable
Cacheable.SingleCacheConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description protected DegreeUniversityHelper_degreeUniversityHelperThe degree university helperprotected ODFSearchHelper_odfSearchHelperThe ODF search helperstatic StringCRITERION_DEFINITIONS_PREFIX_IDThe prefix for program searchablestatic StringPARAMETER_SEARCH_ON_SUBPROGRAMSThe additional parameter for indicating if search has to be made also on subprogramsstatic StringPROGRAM_SEARCHEABLE_INDEXING_FIELD_PREFIXThe prefix for indexing field in program searcheablestatic StringROLEAvalon Role-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_associatedContentReturnable, _contentHelper, _criteriaPosition, _cTypeEP, _id, _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 protected booleanappliesToSubprogram(SearchCriterionDefinition criterion)Determines if the givenSearchCriterionDefinitionapplies to Subprogramsprotected StringassociatedContentReturnableRole()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 ModelCollection<SearchCriterionDefinition>getCriteria(AdditionalParameterValueMap additionalParameterValues)Gets the criteriaprotected StringgetCriterionDefinitionPrefix()Gets the prefix for criterion definitionsprotected QuerygetProgramThroughSubprogramsQuery(Query queryOnCriterion)Gets theQuerythat returns Programs by querying their SubProgramsOptional<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)-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedSearchable
_setAssociatedContentReturnable, configure, contextualize, criteriaPosition, dispose, getCacheManager, getIndexingFieldCriterionDefinitionPrefix, getLabel, getManagedCaches, getSystemPropertyCriterionDefinitionPrefix, hasComputableSize, initialize
-
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.core.util.Cacheable
createCaches, getCache, isCachingEnabled, removeCaches
-
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
public static final String CRITERION_DEFINITIONS_PREFIX_ID
The prefix for program searchable- See Also:
- Constant Field Values
-
PROGRAM_SEARCHEABLE_INDEXING_FIELD_PREFIX
public static final String PROGRAM_SEARCHEABLE_INDEXING_FIELD_PREFIX
The prefix for indexing field in program searcheable- See Also:
- Constant Field Values
-
_odfSearchHelper
protected ODFSearchHelper _odfSearchHelper
The ODF search helper
-
_degreeUniversityHelper
protected DegreeUniversityHelper _degreeUniversityHelper
The degree university helper
-
-
Constructor Detail
-
ProgramSearchable
public ProgramSearchable()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractContentBasedSearchable- Throws:
ServiceException
-
associatedContentReturnableRole
protected String 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
protected String getCriterionDefinitionPrefix()
Description copied from class:AbstractContentBasedSearchableGets the prefix for criterion definitions- Specified by:
getCriterionDefinitionPrefixin classAbstractContentBasedSearchable- Returns:
- the prefix for criterion definitions
-
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- Overrides:
relationsWithin classAbstractContentBasedSearchable- Returns:
- some relations the type must have with some
Returnables
-
getContentTypes
protected Collection<String> getContentTypes(AdditionalParameterValueMap additionalParameterValues)
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
-
appliesToSubprogram
protected boolean appliesToSubprogram(SearchCriterionDefinition criterion)
Determines if the givenSearchCriterionDefinitionapplies to Subprograms- Parameters:
criterion- the criterion- Returns:
trueif the givenSearchCriterionDefinitionapplies to Subprograms
-
getProgramThroughSubprogramsQuery
protected Query getProgramThroughSubprogramsQuery(Query queryOnCriterion)
Gets theQuerythat returns Programs by querying their SubPrograms- Parameters:
queryOnCriterion- The query on SubPrograms- Returns:
- The
Querythat returns Programs
-
getCriteria
public Collection<SearchCriterionDefinition> getCriteria(AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:SearchableGets the criteria- Specified by:
getCriteriain interfaceSearchable- Overrides:
getCriteriain classAbstractContentBasedSearchable- Parameters:
additionalParameterValues- The additional parameter values- Returns:
- the criteria
-
-