Class AbstractFormEntrySearchCriterionDefinition<T>
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<T>
org.ametys.cms.search.model.impl.AbstractCriterionDefinition<T>
org.ametys.web.frontoffice.search.metamodel.impl.AbstractSearchServiceCriterionDefinition<T>
org.ametys.plugins.forms.search.criteria.AbstractFormEntrySearchCriterionDefinition<T>
- Type Parameters:
T- the type of the criterion value
- All Implemented Interfaces:
Comparable<ModelItem>,CriterionDefinition<T>,ElementDefinition<T>,ModelItem,Labelable,ModifiableLabelable,SearchServiceCriterionDefinition<T>
- Direct Known Subclasses:
FormEntryAuthorSearchCriterionDefinition,FormEntryLastUpdateSearchCriterionDefinition,FormEntrySubmissionDateSearchCriterionDefinition,FormEntryWorkflowStepSearchCriterionDefinition,FormQuestionSearchCriterionDefinition
public abstract class AbstractFormEntrySearchCriterionDefinition<T>
extends AbstractSearchServiceCriterionDefinition<T>
SearchServiceCriterionDefinition for form entry-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FormThe form on which the criterion is basedprotected FormEntryDAOThe form entry DAOprotected ModelItemTypeExtensionPointThe model item type extension pointprotected UserManagerThe user managerFields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractSearchServiceCriterionDefinition
_criterionTypeExtensionPoint, _searchServiceCriterionDefinitionHelperFields inherited from class org.ametys.cms.search.model.impl.AbstractCriterionDefinition
_criterionDefinitionHelper, _joinedPaths, _multipleOperandOperator, _solrFacetFieldNameFields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_loggerFields inherited from class org.ametys.runtime.model.AbstractModelItem
__context, __serviceManagerFields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPEFields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionThe constructor of the criterion definition. -
Method Summary
Modifier and TypeMethodDescriptiongetEmptyValueQuery(String language, Map<String, Object> contextualParameters) Gets the query for testing the value is emptygetFacetLabel(String value, Map<String, Object> contextualParameters) Gets the label of a facet valueprotected FormEntryDAORetrieves theFormEntryDAOgetJoinedPaths(Map<String, Object> contextualParameters) Retrieves the joined paths of the criteriongetLabel()Retrieves the label.abstract StringGet the model item id of the form entry on which the criterion is based.abstract I18nizableTextGet the model item label of the form entry on which the criterion is based.protected ModelItemTypeExtensionPointRetrieves theModelItemTypeExtensionPointgetName()Get the name.Gets the (Searchable) the criterion belongs to.getType()Retrieves the type.protected UserManagerRetrieves theUserManagervoidsetSearchable(Searchable searchable) Sets the (Searchable) the criterion belongs to.Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractSearchServiceCriterionDefinition
_getCriterionTypeExtensionPoint, _getSearchServiceCriterionDefinitionHelper, _toJSON, dispose, getRestrictedEnumerator, isEnumerated, isTooBigForStaticEnumeratorMethods inherited from class org.ametys.cms.search.model.impl.AbstractCriterionDefinition
_getCriterionDefinitionHelper, _getDefaultWidget, _getDefaultWidgetParameters, convertQueryValue, getMultipleOperandOperator, getQuery, getQueryContext, getSolrFacetFieldName, getWidget, getWidgetParameters, setJoinedPaths, setSolrFacetFieldNameMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isMultiple, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParameters, toSAXMethods inherited from class org.ametys.runtime.model.AbstractModelItem
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, addItemChecker, compareTo, disableConditionsToJSON, equals, getDescription, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, hashCode, setContext, setDescription, setDisableConditions, setLabel, setModel, setName, setParent, setPluginName, setServiceManager, toJSON, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.ametys.cms.search.model.CriterionDefinition
convertQueryValue, getQuery, getQuery, getQuery, getSolrFacetFieldNameMethods 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, setValidatorConfigurationMethods inherited from interface org.ametys.runtime.util.Labelable
getDescriptionMethods 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, toSAXMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setNameMethods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchServiceCriterionDefinition
convertRestrictedValue, facetValueToSAX, getContextPrefixLabel
-
Field Details
-
_form
The form on which the criterion is based -
_userManager
The user manager -
_formEntryDAO
The form entry DAO -
_modelItemTypeEP
The model item type extension point
-
-
Constructor Details
-
AbstractFormEntrySearchCriterionDefinition
The constructor of the criterion definition.- Parameters:
form- The form on which the criterion is based
-
-
Method Details
-
getName
Description copied from interface:LabelableGet the name.- Specified by:
getNamein interfaceLabelable- Overrides:
getNamein classAbstractModelItem- Returns:
- the name.
-
getLabel
Description copied from interface:LabelableRetrieves the label.- Specified by:
getLabelin interfaceLabelable- Overrides:
getLabelin classAbstractModelItem- Returns:
- the label.
-
getType
Description copied from interface:ModelItemRetrieves the type.- Specified by:
getTypein interfaceCriterionDefinition<T>- Specified by:
getTypein interfaceElementDefinition<T>- Specified by:
getTypein interfaceModelItem- Overrides:
getTypein classAbstractCriterionDefinition<T>- Returns:
- the type.
-
getJoinedPaths
Description copied from interface:CriterionDefinitionRetrieves the joined paths of the criterion- Specified by:
getJoinedPathsin interfaceCriterionDefinition<T>- Overrides:
getJoinedPathsin classAbstractCriterionDefinition<T>- Parameters:
contextualParameters- the search contextual parameters.- Returns:
- the joined paths, or an empty list if the criterion is not joined
-
getSearchable
Description copied from interface:SearchServiceCriterionDefinitionGets the (Searchable) the criterion belongs to.
Important: if the criterion definition is brought by a specific Searchable, then this searchable must be returned in a non-emptyOptional. If the criterion definition is brought bySearchServiceCommonImpls, then anOptional.empty()must be returned.- Specified by:
getSearchablein interfaceSearchServiceCriterionDefinition<T>- Overrides:
getSearchablein classAbstractSearchServiceCriterionDefinition<T>- Returns:
- the (
Searchable) the criterion belongs to.
-
setSearchable
Description copied from interface:SearchServiceCriterionDefinitionSets the (Searchable) the criterion belongs to.- Specified by:
setSearchablein interfaceSearchServiceCriterionDefinition<T>- Overrides:
setSearchablein classAbstractSearchServiceCriterionDefinition<T>- Parameters:
searchable- theSearchableto set
-
getFacetLabel
public Optional<I18nizableText> getFacetLabel(String value, Map<String, Object> contextualParameters) Gets the label of a facet value- Parameters:
value- the facet valuecontextualParameters- the contextual parameters- Returns:
- the label of a facet value
-
getEmptyValueQuery
Description copied from interface:SearchServiceCriterionDefinitionGets the query for testing the value is empty- Parameters:
language- The current search language.contextualParameters- the search contextual parameters.- Returns:
- the query for testing the value is empty
-
getUserManager
Retrieves theUserManager- Returns:
- the
UserManager
-
getFormEntryDAO
Retrieves theFormEntryDAO- Returns:
- the
FormEntryDAO
-
getModelItemTypeEP
Retrieves theModelItemTypeExtensionPoint- Returns:
- the
ModelItemTypeExtensionPoint
-
getModelItemId
Get the model item id of the form entry on which the criterion is based.- Returns:
- the model item id of the form entry on which the criterion is based.
-
getModelItemLabel
Get the model item label of the form entry on which the criterion is based.- Returns:
- the model item label of the form entry on which the criterion is based.
-