Interface IndexationAwareElementDefinition<T,X extends ModelAwareDataAwareAmetysObject>

Type Parameters:
T - Type of the element value
X - 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

Interface for ElementDefinition that have specific behaviors for indexation
  • 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

      default boolean isSortable()
      Get if the element can be sorted on.
      Returns:
      true if the element can be sorted on, false otherwise.
    • isFacetable

      default boolean 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

      Object getValue(X ametysObject)
      Get the element's value
      Parameters:
      ametysObject - the ametysObject containing the element
      Returns:
      the values to index.
    • getSortValue

      default Object getSortValue(X ametysObject)
      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 interface ElementDefinition<T>
      Specified by:
      getType in interface ModelItem
      Returns:
      the type.