Interface CriterionDefinitionAwareElementDefinition<T,C,X extends ModelAwareDataAwareAmetysObject>

Type Parameters:
T - Type of the element value
C - Type of criterion
X - type of ametys object supported by this definition
All Superinterfaces:
Comparable<ModelItem>, ElementDefinition<T>, IndexationAwareElementDefinition<T,X>, Labelable, ModelItem, ModifiableLabelable
All Known Implementing Classes:
AbstractDateTimeIndexableSystemProperty, AbstractElementsReferencingProperty, AbstractIndexableContentProperty, AbstractIndexableProperty, AbstractIndexableStaticProperty, AbstractIndexableSystemProperty, AbstractMultiTypedValuesProperty, AbstractMultiValuesProperty, AbstractUserIndexableSystemProperty, CollectionsSystemProperty, CommentsSystemProperty, ComposedSingleModelItemsProperty, ComputedStepHolderProperty, ContainerMCCWorkflowStatusProperty, ContentElementReferencingProperty, ContentIdSystemProperty, ContentPrivacySystemProperty, ContentTypeSystemProperty, ContributorSystemProperty, CreationDateSystemProperty, CreatorSystemProperty, DegreeOrderProperty, DegreeTypeProperty, DisplayCodeProperty, ElementReferencingProperty, EnumeratingProperty, FirstValidationSystemProperty, FirstValidatorSystemProperty, FulltextSystemProperty, HasLiveVersionSystemProperty, InvalidContainerDataProperty, LanguageSystemProperty, LastMajorValidationSystemProperty, LastMajorValidatorSystemProperty, LastModifiedSystemProperty, LastValidationSystemProperty, LastValidatorSystemProperty, MemberProjectProperty, MultiContentValuesProperty, MultiStringValuesProperty, NearestOrgUnitsProperty, ODFPrimaryContentTypeProperty, OrgUnitAncestorProperty, OrphanSystemProperty, OverridenThematicsProperty, PagesSystemProperty, ParentContentSystemProperty, ParentProgramsProperty, ParentSubProgramsProperty, PinProperty, ProfiledGroupsTagsSystemProperty, ProgramMCCWorkflowStatusProperty, SharedProperty, SharedSystemProperty, SiteSystemProperty, SiteTypeSystemProperty, SubProgramParentProgramProperty, TagsSystemProperty, TagsSystemProperty, TrashElementSiteProperty, ViewBasedFullTextSystemProperty, WorkflowNameSystemProperty, WorkflowStepSystemProperty, WorkflowStepSystemProperty

Interface for ElementDefinition supporting referencing criteria
  • Method Details

    • getDefaultCriterionEnumerator

      Get the enumerator to use when rendering this item as a criterion, if no other enumerator is specified on criterion
      Parameters:
      configuration - The enumerator configuration.
      enumeratorManager - ComponentManager for the criterion's Enumerator
      Returns:
      The enumerator or null if there is no default enumerator for the criterion
      Throws:
      ConfigurationException - If an error occurs while initializing the enumerator
    • getCriterionType

      Get the type to use when rendering the element as a criterion
      Returns:
      the type to use for a criterion
    • convertQueryValue

      default Object convertQueryValue(Object value, String language, Map<String,Object> contextualParameters) throws BadItemTypeException
      Converts the given value to have the right typed value to give to the getQuery(Object, Operator, String, Map) method
      Parameters:
      value - the value to convert
      language - The current search language.
      contextualParameters - the search contextual parameters.
      Returns:
      the value, converted to a well typed value
      Throws:
      BadItemTypeException - if the given value can not be converted
    • getQuery

      default Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
      Get the Query associated to the given value.
      Parameters:
      value - the user-submitted value for this item.
      operator - In advanced search mode, the operator chosen by the user. null to use the criterion-defined operator (simple search mode).
      language - The current search language.
      contextualParameters - the search contextual parameters.
      Returns:
      The Query associated to the given value.
    • getDefaultCriterionWidget

      Get the widget to use when rendering this item as a criterion, if no other widget is specified on criterion
      Returns:
      The widget to use, or null if no specific widget is necessary by default.
    • getDefaultCriterionWidgetParameters

      Get the widget parameters to use when rendering this item as a criterion If some other parameters are specified on criterion, all parameters are used If a parameter with the same name is specified on criterion, this parameter is used, not the default one
      Parameters:
      configuration - The widget parameters configuration
      Returns:
      The default widget parameters to use, or an empty Map if no specific widget parameters are necessary by default.
    • getDefaultCriterionOperator

      Get the operator to use when rendering this item as a criterion, if no other operator is specified on criterion
      Returns:
      The default operator to use