Package org.ametys.odf.course.search
Class ShareableCourseSearchUICriteria
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
-
- org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
-
- org.ametys.odf.course.search.ShareableCourseSearchUICriteria
-
- All Implemented Interfaces:
Field
,SearchCriterion
,SearchUICriterion
,Configurable
,Serviceable
public class ShareableCourseSearchUICriteria extends AbstractCustomSearchUICriterion
UI criteria for shareable course
-
-
Field Summary
Fields Modifier and Type Field Description protected ODFHelper
_odfHelper
The ODF helperprotected ShareableCourseHelper
_shareableCourseHelper
The shareable course helper-
Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO
-
-
Constructor Summary
Constructors Constructor Description ShareableCourseSearchUICriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Query
_getFieldQuery(Set<String> values, String metadataName)
Get query for the shareable course field.String
getFieldId()
Get the field identifier.Query.Operator
getOperator()
Get the criterion Operator.Query
getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
Get theQuery
associated to the given value.MetadataType
getType()
Retrieves the type.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
configureId
-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configure, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidgetParameters, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, getMetadataDefinition, getSearchField, getSubmitClassName, isHidden, isMultiple, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.search.model.Field
getEnumerator
-
Methods inherited from interface org.ametys.cms.search.model.SearchCriterion
getId, getQuery, isFacetable, isSortable
-
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUICriterion
getDefaultValue, getDescription, getLabel, getValidator, getWidget, getWidgetParameters
-
-
-
-
Field Detail
-
_odfHelper
protected ODFHelper _odfHelper
The ODF helper
-
_shareableCourseHelper
protected ShareableCourseHelper _shareableCourseHelper
The shareable course helper
-
-
Constructor Detail
-
ShareableCourseSearchUICriteria
public ShareableCourseSearchUICriteria()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSearchUICriterion
- Throws:
ServiceException
-
getFieldId
public String getFieldId()
Description copied from interface:SearchUICriterion
Get the field identifier. Used to match standard, advanced and faceted criterion (even if the operator is different), whatever their ID is.- Returns:
- the field identifier.
-
getOperator
public Query.Operator getOperator()
Description copied from interface:SearchCriterion
Get the criterion Operator.- Returns:
- the criterion Operator.
-
getType
public MetadataType getType()
Description copied from class:Parameter
Retrieves the type.- Specified by:
getType
in interfaceField
- Overrides:
getType
in classParameter<MetadataType>
- Returns:
- the type.
-
getQuery
public Query getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterion
Get theQuery
associated to the given value.- Parameters:
value
- The user-submitted value (or the default value if not set) for this criterion.customOperator
- In advanced search mode, the operator chosen by the user.null
to use the criterion-defined operator (simple search mode).allValues
- All the user-submitted values.language
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
Query
associated to the given value.
-
_getFieldQuery
protected Query _getFieldQuery(Set<String> values, String metadataName)
Get query for the shareable course field. Query is "not(field) or field = values"- Parameters:
values
- the valuesmetadataName
- the metadata name of the field- Returns:
- the fitler query
-
-