Package org.ametys.cms.search.model
Interface IndexationAwareElementDefinition<T,X extends ModelAwareDataAwareAmetysObject>
- Type Parameters:
T
- Type of the element valueX
- type of ametys object supported by this definition
- All Superinterfaces:
Comparable<ModelItem>
,ElementDefinition<T>
,Labelable
,ModelItem
,ModifiableLabelable
- All Known Subinterfaces:
IndexationAwareSystemProperty<T,
X>
- 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
,HasLiveVersionSystemProperty
,InvalidContainerDataProperty
,LanguageSystemProperty
,LastMajorValidationSystemProperty
,LastMajorValidatorSystemProperty
,LastModifiedSystemProperty
,LastValidationSystemProperty
,LastValidatorSystemProperty
,MemberProjectProperty
,MultiContentValuesProperty
,MultiStringValuesProperty
,ODFPrimaryContentTypeProperty
,OrgUnitAncestorProperty
,OrphanSystemProperty
,OverridenThematicsProperty
,PagesSystemProperty
,ParentContentSystemProperty
,ParentProgramsProperty
,ParentSubProgramsProperty
,PinProperty
,ProfiledGroupsTagsSystemProperty
,ProgramMCCWorkflowStatusProperty
,ProgramSkillsProperty
,SelfAndParentOrgUnitsProperty
,SemanticAnnotationSystemProperty
,SharedProperty
,SharedSystemProperty
,SiteSystemProperty
,SiteTypeSystemProperty
,SubProgramParentProgramProperty
,TagsSystemProperty
,TagsSystemProperty
,ViewBasedFullTextSystemProperty
,WorkflowNameSystemProperty
,WorkflowStepSystemProperty
,WorkflowStepSystemProperty
public interface IndexationAwareElementDefinition<T,X extends ModelAwareDataAwareAmetysObject>
extends ElementDefinition<T>
Interface for
ElementDefinition
that have specific behaviors for indexation-
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 String
Retrieves the name of the element's solr facet fielddefault String
Retrieves the name of the element's solr fieldRetrieves the name of the element's solr sort fielddefault Object
getSortValue
(X ametysObject) Get the sort value represented by this field in the given result ametys object.getType()
Retrieves the type.Get the element's valuedefault void
indexValue
(org.apache.solr.common.SolrInputDocument document, X ametysObject, CMSDataContext context) Index the element in a solr document.default boolean
Gets if the element can be facetabledefault boolean
Get if the element can be sorted on.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
-
indexValue
default void indexValue(org.apache.solr.common.SolrInputDocument document, X ametysObject, CMSDataContext context) Index the element in a solr document.- 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.
-
isSortable
Get if the element can be sorted on.- Returns:
true
if the element can be sorted on,false
otherwise.
-
isFacetable
Gets if the element can be facetable- Returns:
true
if the element can be facetable,false
otherwise.
-
getSolrFieldName
Retrieves the name of the element's solr field- Returns:
- the name of the element's solr field
-
getSolrSortFieldName
Retrieves the name of the element's solr sort field- Returns:
- the name of the element's solr sort field
-
getSolrFacetFieldName
Retrieves the name of the element's solr facet field- Returns:
- the name of the element's solr facet field
-
getValue
Get the element's value- Parameters:
ametysObject
- the ametysObject containing the element- Returns:
- the values to index.
-
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).
-
getType
Description copied from interface:ModelItem
Retrieves the type.- Specified by:
getType
in interfaceElementDefinition<T>
- Specified by:
getType
in interfaceModelItem
- Returns:
- the type.
-