Class ContentIdSystemProperty

All Implemented Interfaces:
Comparable<ModelItem>, Property<String,Content>, SystemProperty<String,Content>, ElementDefinition<String>, ModelItem, PluginAware, Labelable, ModifiableLabelable, Configurable, Serviceable

SystemProperty which represents the current id of a content.
  • Constructor Details

  • Method Details

    • indexValue

      public void indexValue(org.apache.solr.common.SolrInputDocument document, Content ametysObject, IndexableDataContext context)
      Description copied from interface: Property
      Index the property in a solr document.
      Specified by:
      indexValue in interface Property<String,Content>
      Overrides:
      indexValue in class AbstractSystemProperty<String,Content>
      Parameters:
      document - the solr document to index into.
      ametysObject - the ametysObject containing the property to index.
      context - the context of the data to index. Can not be null.
    • isMultiple

      public boolean isMultiple()
      Description copied from interface: ElementDefinition
      Test if the element is multiple.
      Specified by:
      isMultiple in interface ElementDefinition<String>
      Overrides:
      isMultiple in class DefaultElementDefinition<String>
      Returns:
      true if the metadata is multiple.
    • isSortable

      public boolean isSortable()
      Description copied from interface: SystemProperty
      Get if the property can be sorted on.
      Returns:
      true if the property can be sorted on, false otherwise.
    • getQuery

      public Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
      Description copied from interface: SystemProperty
      Get the Query associated to the given value.
      Parameters:
      value - the user-submitted value for this property.
      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.
    • getSearchField

      Description copied from interface: SystemProperty
      Get the SearchField representing this system property.
      Returns:
      The search field representing this system property.
    • getValue

      public Object getValue(Content content)
      Description copied from interface: Property
      Get the property's value
      Parameters:
      content - the ametysObject containing the property
      Returns:
      the values to index.
    • valueToJSON

      public Object valueToJSON(Content content, DataContext context)
      Description copied from interface: Property
      Convert the property into a JSON object
      Parameters:
      content - the ametysObject containing the property to convert.
      context - the context of the data to convert. Can not be null.
      Returns:
      The property as JSON
    • valueToSAX

      public void valueToSAX(ContentHandler contentHandler, Content content, DataContext context) throws SAXException
      Description copied from interface: Property
      Generates SAX events for the property
      Parameters:
      contentHandler - the ContentHandler that will receive the SAX events
      content - the ametysObject containing the property to SAX.
      context - the context of the data to SAX. Can not be null.
      Throws:
      SAXException - if an error occurs during the SAX events generation
    • _getTypeId

      protected String _getTypeId()
      Description copied from class: AbstractProperty
      Retrieves the id of the property's type
      Specified by:
      _getTypeId in class AbstractProperty<String,Content>
      Returns:
      the id of the property's type