Package org.ametys.cms.search.systemprop
Class AbstractIndexableSystemProperty<T,C,X extends ModelAwareDataAwareAmetysObject>
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<T>
org.ametys.cms.model.properties.AbstractProperty<T,X>
org.ametys.cms.model.properties.AbstractStaticProperty<T,X>
org.ametys.cms.model.properties.AbstractIndexableStaticProperty<T,C,X>
org.ametys.cms.search.systemprop.AbstractIndexableSystemProperty<T,C,X>
- Type Parameters:
T
- type of the property valuesC
- type of criterionX
- type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>
,Property<T,
,X> CriterionDefinitionAwareElementDefinition<T,
,C, X> IndexationAwareElementDefinition<T,
,X> SystemProperty<T,
,X> IndexationAwareSystemProperty<T,
,X> ElementDefinition<T>
,ModelItem
,PluginAware
,Labelable
,ModifiableLabelable
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
AbstractDateTimeIndexableSystemProperty
,AbstractUserIndexableSystemProperty
,CollectionsSystemProperty
,CommentsSystemProperty
,ContentIdSystemProperty
,ContentPrivacySystemProperty
,ContentTypeSystemProperty
,FulltextSystemProperty
,HasLiveVersionSystemProperty
,LanguageSystemProperty
,OrphanSystemProperty
,PagesSystemProperty
,ParentContentSystemProperty
,SharedSystemProperty
,SiteSystemProperty
,SiteTypeSystemProperty
,TagsSystemProperty
,ViewBasedFullTextSystemProperty
,WorkflowNameSystemProperty
,WorkflowStepSystemProperty
public abstract class AbstractIndexableSystemProperty<T,C,X extends ModelAwareDataAwareAmetysObject>
extends AbstractIndexableStaticProperty<T,C,X>
implements IndexationAwareSystemProperty<T,X>
Abstract class for single indexation aware system property
-
Field Summary
Fields inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
_criterionDefinitionHelper, _indexationAwareElementDefinitionHelper
Fields inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_context
Fields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_logger
Fields inherited from class org.ametys.runtime.model.AbstractModelItem
__context, __serviceManager
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Retrieves the name of the configuration attribute that contains the name of the propertyGet the schema definitions brought by this element.protected Object
getSortValue
(X ametysObject) Get the sort value represented by this field in the given result ametys object.void
indexValue
(org.apache.solr.common.SolrInputDocument document, X ametysObject, CMSDataContext context) Index the element in a solr document.protected String[]
parseStringArray
(Object value) Get the value as a array of StringMethods inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
getCriterionType, getCriterionTypeId, getSolrSortFieldName, service
Methods inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_parseAndSetEnumerator, _parseDescription, _parseLabel, _parseName, configure, contextualize
Methods inherited from class org.ametys.cms.model.properties.AbstractProperty
getType, getTypeId, init, isEditable, setPluginInfo
Methods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _toJSON, _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, setWidgetParameters, toSAX
Methods 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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.cms.search.model.CriterionDefinitionAwareElementDefinition
convertQueryValue, getDefaultCriterionEnumerator, getDefaultCriterionOperator, getDefaultCriterionWidget, getDefaultCriterionWidgetParameters, getQuery
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.cms.search.model.IndexationAwareElementDefinition
getSolrFacetFieldName, getSolrFieldName, getSolrSortFieldName, getType, getValue, isFacetable, isSortable
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
Methods inherited from interface org.ametys.cms.model.properties.Property
getType, getValue, init, valueToJSON, valueToSAX
Methods inherited from interface org.ametys.cms.search.model.SystemProperty
getColumnWidth, getConverter, getRenderer, isDisplayable
-
Constructor Details
-
AbstractIndexableSystemProperty
public AbstractIndexableSystemProperty()
-
-
Method Details
-
_getNameConfigurationAttribute
Description copied from class:AbstractStaticProperty
Retrieves the name of the configuration attribute that contains the name of the property- Overrides:
_getNameConfigurationAttribute
in classAbstractStaticProperty<T,
X extends ModelAwareDataAwareAmetysObject> - Returns:
- the name of the configuration attribute that contains the name of the property
-
indexValue
public void indexValue(org.apache.solr.common.SolrInputDocument document, X ametysObject, CMSDataContext context) Description copied from interface:IndexationAwareElementDefinition
Index the element in a solr document.- Specified by:
indexValue
in interfaceIndexationAwareElementDefinition<T,
C> - Parameters:
document
- the solr document to index into.ametysObject
- the ametysObject containing the element to index.context
- the context of the data to index. Can not be null.
-
getSortValue
Get the sort value represented by this field in the given result ametys object.- Parameters:
ametysObject
- the result ametys object.- Returns:
- the content sort value, must be scalar (String, long, double, Date).
-
getSchemaDefinitions
Description copied from interface:IndexationAwareSystemProperty
Get the schema definitions brought by this element.- Specified by:
getSchemaDefinitions
in interfaceIndexationAwareSystemProperty<T,
C> - Returns:
- The schema definitions used by this element.
-
parseStringArray
Get the value as a array of String- Parameters:
value
- The value as an object to parse- Returns:
- The values as a String array
-