Package org.ametys.cms.model.properties
Class AbstractIndexableContentProperty<X extends ModelAwareDataAwareAmetysObject>
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<ContentValue>
org.ametys.cms.model.properties.AbstractProperty<ContentValue,X>
org.ametys.cms.model.properties.AbstractStaticProperty<ContentValue,X>
org.ametys.cms.model.properties.AbstractIndexableStaticProperty<ContentValue,ContentValue,X>
org.ametys.cms.model.properties.AbstractIndexableContentProperty<X>
- Type Parameters:
X- type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>,ContentElementDefinition,Property<ContentValue,,X> CriterionDefinitionAwareElementDefinition<ContentValue,,ContentValue, X> IndexationAwareElementDefinition<ContentValue,,X> ElementDefinition<ContentValue>,ModelItem,ModelItemAccessor,PluginAware,Labelable,ModifiableLabelable,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
ComputedStepHolderProperty,NearestOrgUnitsProperty,OrgUnitAncestorProperty,OverridenThematicsProperty,ParentProgramsProperty,ParentSubProgramsProperty
public abstract class AbstractIndexableContentProperty<X extends ModelAwareDataAwareAmetysObject>
extends AbstractIndexableStaticProperty<ContentValue,ContentValue,X>
implements ContentElementDefinition
Abstract class for content property
-
Field Summary
Fields inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
_criterionDefinitionHelper, _indexationAwareElementDefinitionHelperFields inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_contextFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Set<? extends ModifiableContent> _getLinkedContents(X dataHolder) Get the linked contents to index._toJSON(DefinitionContext context) Converts the model item in a JSON mapCollection<? extends ModelItem> Retrieves all the model items of this accessorprotected StringRetrieves the id of the property's typeGet the element's valuevoidservice(ServiceManager manager) voidsetContentTypeId(String contentTypeId) Set the element's content type identifier.voidtoSAX(ContentHandler contentHandler, DefinitionContext context) Generates SAX events for the model itemMethods inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
getCriterionType, getCriterionTypeId, getSolrSortFieldNameMethods inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_getNameConfigurationAttribute, _parseAndSetEnumerator, _parseDescription, _parseLabel, _parseName, configure, contextualizeMethods inherited from class org.ametys.cms.model.properties.AbstractProperty
getType, init, isEditable, setPluginInfoMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, getWidget, getWidgetParameters, isMultiple, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParametersMethods inherited from class org.ametys.runtime.model.AbstractModelItem
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, addItemChecker, compareTo, disableConditionsToJSON, equals, getDescription, getDisableConditions, getItemCheckers, getLabel, 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.model.ContentElementDefinition
getContentTypeIdMethods inherited from interface org.ametys.cms.search.model.CriterionDefinitionAwareElementDefinition
convertQueryValue, getDefaultCriterionEnumerator, getDefaultCriterionOperator, getDefaultCriterionWidget, getDefaultCriterionWidgetParameters, getQueryMethods 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.cms.search.model.IndexationAwareElementDefinition
getSolrFacetFieldName, getSolrFieldName, getType, indexValue, isFacetable, isSortableMethods 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, toJSONMethods 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.cms.model.properties.Property
valueToJSON, valueToSAX
-
Constructor Details
-
AbstractIndexableContentProperty
public AbstractIndexableContentProperty()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractIndexableStaticProperty<ContentValue,ContentValue, X extends ModelAwareDataAwareAmetysObject> - Throws:
ServiceException
-
getTypeId
Description copied from class:AbstractPropertyRetrieves the id of the property's type- Specified by:
getTypeIdin classAbstractProperty<ContentValue,X extends ModelAwareDataAwareAmetysObject> - Returns:
- the id of the property's type
-
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
-
_toJSON
Description copied from class:AbstractModelItemConverts the model item in a JSON map- Overrides:
_toJSONin classDefaultElementDefinition<ContentValue>- Parameters:
context- the context of the definition- Returns:
- The model item as a JSON map
-
toSAX
Description copied from interface:ModelItemGenerates SAX events for the model item- Specified by:
toSAXin interfaceModelItem- Overrides:
toSAXin classDefaultElementDefinition<ContentValue>- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventscontext- the context of the definition- Throws:
SAXException- if an error occurs during the SAX events generation
-
getValue
Description copied from interface:IndexationAwareElementDefinitionGet the element's value- Specified by:
getValuein interfaceIndexationAwareElementDefinition<ContentValue,X extends ModelAwareDataAwareAmetysObject> - Specified by:
getValuein interfaceProperty<ContentValue,X extends ModelAwareDataAwareAmetysObject> - Parameters:
dataHolder- the ametysObject containing the element- Returns:
- the values to index.
-
_getLinkedContents
Get the linked contents to index.- Parameters:
dataHolder- The data holder- Returns:
- The linked contents
-