Class ContentReferencingSearchServiceCriterionDefinition
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<ContentValue>
org.ametys.cms.search.model.impl.AbstractCriterionDefinition<ContentValue>
org.ametys.cms.search.model.impl.ReferencingCriterionDefinition<ContentValue>
org.ametys.web.frontoffice.search.metamodel.impl.ReferencingSearchServiceCriterionDefinition<ContentValue>
org.ametys.web.frontoffice.search.metamodel.impl.ContentReferencingSearchServiceCriterionDefinition
- All Implemented Interfaces:
Comparable<ModelItem>,ContentElementDefinition,CriterionDefinition<ContentValue>,ElementDefinition<ContentValue>,ModelItem,ModelItemAccessor,Labelable,ModifiableLabelable,SearchServiceCriterionDefinition<ContentValue>
- Direct Known Subclasses:
DegreeUniversityCriterionDefinition
public class ContentReferencingSearchServiceCriterionDefinition
extends ReferencingSearchServiceCriterionDefinition<ContentValue>
implements ContentElementDefinition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentHelperThe content helperprotected AmetysObjectResolverThe resolverFields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.ReferencingSearchServiceCriterionDefinition
_searchServiceCriterionDefinitionHelperFields inherited from class org.ametys.cms.search.model.impl.ReferencingCriterionDefinition
_contentSearchHelper, _contentTypeExtensionPoint, _contentTypeIds, _criterionTypeExtensionPoint, _reference, _referencePath, NONE_VALUEFields 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
ConstructorsConstructorDescriptionContentReferencingSearchServiceCriterionDefinition(ElementDefinition reference, String referencePath, ContentType baseContentType) Constructor used to create a FO criterion definition on a referenced item of type content -
Method Summary
Modifier and TypeMethodDescriptionprotected AmetysObjectResolverRetrieves theAmetysObjectResolverprotected ContentHelperRetrieves theContentHelperprotected ExpressiongetContentTypeExpression(String parentCTypeId) Gets the content type expression for retrieving enumeration of contentsGet the element's content type identifier.Collection<? extends ModelItem> Retrieves all the model items of this accessorgetOrder(ContentValue contentValue) Get the order of the content id value for a search criterion definition referencing a model item of type contentRetrieves the referenced element definitiongetRestrictedEnumerator(Map<String, Object> contextualParameters) Gets theRestrictedEnumeratorused by the final user to fill the criterion.booleanDetermines if this criterion definition is enumeratedvoidsetContentTypeId(String contentTypeId) Set the element's content type identifier.Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.ReferencingSearchServiceCriterionDefinition
_getSearchServiceCriterionDefinitionHelper, _toJSON, getContextPrefixLabels, getEmptyValueQuery, getFacetLabel, getSearchable, getValidator, isMultiple, isTooBigForStaticEnumerator, setSearchableMethods inherited from class org.ametys.cms.search.model.impl.ReferencingCriterionDefinition
_getContentSearchHelper, _getContentTypeExtensionPoint, _getCriterionTypeExtensionPoint, _getDefaultEnumerator, _getDefaultWidget, _getDefaultWidgetParameters, _getFacetFieldNameSuffix, _getRootCriterionConfiguration, _isFacetable, convertQueryValue, getContentTypeIds, getDescription, getEnumerator, getJoinedPaths, getLabel, getQuery, getReferencePath, getSolrFacetFieldName, getType, setContentTypeIds, setReference, setReferencePathMethods inherited from class org.ametys.cms.search.model.impl.AbstractCriterionDefinition
_getCriterionDefinitionHelper, getMultipleOperandOperator, getQueryContext, getWidget, getWidgetParameters, setJoinedPaths, setSolrFacetFieldNameMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumeratorConfiguration, getParsedDefaultValues, getValidatorConfiguration, 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, getDisableConditions, getItemCheckers, getModel, getName, 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, getJoinedPaths, getQuery, getQuery, getQuery, getSolrFacetFieldName, getTypeMethods 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
getDescription, getLabel, getNameMethods 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.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setNameMethods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchServiceCriterionDefinition
convertRestrictedValue, facetValueToSAX
-
Field Details
-
_resolver
The resolver -
_contentHelper
The content helper
-
-
Constructor Details
-
ContentReferencingSearchServiceCriterionDefinition
public ContentReferencingSearchServiceCriterionDefinition(ElementDefinition reference, String referencePath, ContentType baseContentType) Constructor used to create a FO criterion definition on a referenced item of type content- Parameters:
reference- the item referenced by this criterionreferencePath- the path of the criterion's referencebaseContentType- the content type defining the reference
-
-
Method Details
-
isEnumerated
Description copied from interface:SearchServiceCriterionDefinitionDetermines if this criterion definition is enumerated- Specified by:
isEnumeratedin interfaceSearchServiceCriterionDefinition<ContentValue>- Overrides:
isEnumeratedin classReferencingSearchServiceCriterionDefinition<ContentValue>- Returns:
trueif this criterion definition is enumerated,falseotherwise
-
getRestrictedEnumerator
public RestrictedEnumerator<ContentValue> getRestrictedEnumerator(Map<String, Object> contextualParameters) Description copied from interface:SearchServiceCriterionDefinitionGets theRestrictedEnumeratorused by the final user to fill the criterion. Values of thisEnumeratorcan be restricted according to entered values during service configuration- Specified by:
getRestrictedEnumeratorin interfaceSearchServiceCriterionDefinition<ContentValue>- Overrides:
getRestrictedEnumeratorin classReferencingSearchServiceCriterionDefinition<ContentValue>- Parameters:
contextualParameters- The contextual parameters- Returns:
- the enumerated entries
-
getContentTypeExpression
Gets the content type expression for retrieving enumeration of contents- Parameters:
parentCTypeId- The parent content type id- Returns:
- The
Expression
-
getOrder
Get the order of the content id value for a search criterion definition referencing a model item of type content- Parameters:
contentValue- the content value- Returns:
- the order or null if there is no order
-
getReference
Description copied from class:ReferencingCriterionDefinitionRetrieves the referenced element definition- Overrides:
getReferencein classReferencingCriterionDefinition<ContentValue>- Returns:
- the referenced element definition
-
getContentTypeId
Description copied from interface:ContentElementDefinitionGet the element's content type identifier.- Specified by:
getContentTypeIdin interfaceContentElementDefinition- Returns:
- the element's content type identifier.
-
setContentTypeId
Description copied from interface:ContentElementDefinitionSet the element's content type identifier.- Specified by:
setContentTypeIdin interfaceContentElementDefinition- Parameters:
contentTypeId- the content type identifier to set.
-
getModelItems
Description copied from interface:ModelItemAccessorRetrieves all the model items of this accessor- Specified by:
getModelItemsin interfaceContentElementDefinition- Specified by:
getModelItemsin interfaceModelItemAccessor- Returns:
- the model items
-
_getAmetysObjectResolver
Retrieves theAmetysObjectResolver- Returns:
- the
AmetysObjectResolver
-
_getContentHelper
Retrieves theContentHelper- Returns:
- the
ContentHelper
-