Package org.ametys.cms.search.model
Interface CriterionDefinitionAwareElementDefinition<T>
- Type Parameters:
T
- Type of the element value
- All Superinterfaces:
Comparable<ModelItem>
,ElementDefinition<T>
,Labelable
,ModelItem
,ModifiableLabelable
- All Known Implementing Classes:
AbstractDateTimeIndexableSystemProperty
,AbstractElementsReferencingProperty
,AbstractMultiTypedValuesProperty
,AbstractMultiValuesProperty
,AbstractUserIndexableSystemProperty
,CollectionsSystemProperty
,CommentsSystemProperty
,ComputedStepHolderProperty
,ContainerMCCWorkflowStatusProperty
,ContentElementReferencingProperty
,ContentIdSystemProperty
,ContentPrivacySystemProperty
,ContentTypeSystemProperty
,ContributorSystemProperty
,CreationDateSystemProperty
,CreatorSystemProperty
,DegreeOrderProperty
,DegreeTypeProperty
,ElementReferencingProperty
,FirstValidationSystemProperty
,FirstValidatorSystemProperty
,FulltextSystemProperty
,HasLiveVersionSystemProperty
,InvalidContainerDataProperty
,LanguageSystemProperty
,LastMajorValidationSystemProperty
,LastMajorValidatorSystemProperty
,LastModifiedSystemProperty
,LastValidationSystemProperty
,LastValidatorSystemProperty
,MemberProjectProperty
,MultiContentValuesProperty
,MultiStringValuesProperty
,ODFPrimaryContentTypeProperty
,OrgUnitAncestorProperty
,OrphanSystemProperty
,OverridenThematicsProperty
,PagesSystemProperty
,ParentContentSystemProperty
,ParentProgramsProperty
,ParentSubProgramsProperty
,PinProperty
,ProfiledGroupsTagsSystemProperty
,ProgramMCCWorkflowStatusProperty
,ProgramSkillsProperty
,SelfAndParentOrgUnitsProperty
,SharedProperty
,SharedSystemProperty
,SiteSystemProperty
,SiteTypeSystemProperty
,SubProgramParentProgramProperty
,TagsSystemProperty
,TagsSystemProperty
,ViewBasedFullTextSystemProperty
,WorkflowNameSystemProperty
,WorkflowStepSystemProperty
,WorkflowStepSystemProperty
Interface for
ElementDefinition
that have specific behaviors for referencing criteria-
Field Summary
Fields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPE
Fields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
Converts the given value to have the right typed for value to give to thegetQuery(Object, Operator, String, Map)
methoddefault Enumerator
getDefaultCriterionEnumerator
(Configuration configuration, ThreadSafeComponentManager<Enumerator> enumeratorManager) Get the enumerator to use when rendering this property as a criteriondefault Query.Operator
Get the operator to use when rendering the property as a criterionGet the type to use when rendering the element as a criteriondefault String
Get the widget to use when rendering the property as a criteriondefault Map
<String, I18nizableText> getDefaultCriterionWidgetParameters
(Configuration configuration) Get the widget parameters to use when rendering the property as a criteriondefault Query
getQuery
(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Get theQuery
associated to the given value.getType()
Retrieves the type.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.runtime.model.ElementDefinition
getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isEditable, isMultiple, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setValidator, setValidatorConfiguration
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAX
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Method Details
-
getDefaultCriterionEnumerator
default Enumerator getDefaultCriterionEnumerator(Configuration configuration, ThreadSafeComponentManager<Enumerator> enumeratorManager) throws ConfigurationException Get the enumerator to use when rendering this property as a criterion- Parameters:
configuration
- The enumerator configuration.enumeratorManager
- ComponentManager for the criterion'sEnumerator
- Returns:
- The enumerator or null if the property's criterion is not enumerated.
- Throws:
ConfigurationException
- If an error occurs while initializing the enumerator
-
getDefaultCriterionType
Get the type to use when rendering the element as a criterion- Returns:
- the type to use for a criterion
-
convertQueryValue
default Object convertQueryValue(Object value, String language, Map<String, Object> contextualParameters) throws BadItemTypeExceptionConverts the given value to have the right typed for value to give to thegetQuery(Object, Operator, String, Map)
method- Parameters:
value
- the value to convertlanguage
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- the value, converted to a well typed value
- Throws:
BadItemTypeException
- if the given value can not be converted
-
getQuery
default Query getQuery(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Get theQuery
associated to the given value.- Parameters:
value
- the user-submitted value for this property.operator
- In advanced search mode, the operator chosen by the user.null
to use the criterion-defined operator (simple search mode).language
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- The
Query
associated to the given value.
-
getDefaultCriterionWidget
Get the widget to use when rendering the property as a criterion- Returns:
- The widget to use, or
null
if no specific widget is necessary.
-
getDefaultCriterionWidgetParameters
Get the widget parameters to use when rendering the property as a criterion- Parameters:
configuration
- The widget parameters configuration- Returns:
- The widget parameters to use, or an empty Map if no specific widget parameters are necessary.
-
getDefaultCriterionOperator
Get the operator to use when rendering the property as a criterion- Returns:
- The operator to use
-
getType
Description copied from interface:ModelItem
Retrieves the type.- Specified by:
getType
in interfaceElementDefinition<T>
- Specified by:
getType
in interfaceModelItem
- Returns:
- the type.
-