Interface SystemProperty

All Known Implementing Classes:
AbstractSystemProperty, AbstractUserSystemProperty, CollectionsSystemProperty, CommentsSystemProperty, ContentPrivacySystemProperty, ContentTypeSystemProperty, ContributorSystemProperty, CreationDateSystemProperty, CreatorSystemProperty, FirstValidationSystemProperty, FulltextSystemProperty, LanguageSystemProperty, LastMajorValidationSystemProperty, LastModifiedSystemProperty, LastValidationSystemProperty, OrphanSystemProperty, PagesSystemProperty, ParentContentSystemProperty, ProfiledGroupsTagsSystemProperty, SharedSystemProperty, SiteSystemProperty, SiteTypeSystemProperty, TagsSystemProperty, TagsSystemProperty, WorkflowStepSystemProperty, WorkflowStepSystemProperty

public interface SystemProperty
Represents a universal property of a Content (content types, language, current workflow step, ...)
  • Method Details

    • getId

      Get the system property ID.
      Returns:
      The property ID.
    • getLabel

      Get the system property label.
      Returns:
      The property label.
    • getDescription

      Get the system property description.
      Returns:
      The property description.
    • getType

      Get the property type.
      Returns:
      the property type.
    • isMultiple

      boolean isMultiple()
      Get the multiple status of the property.
      Returns:
      true if the property can have multiple values, false otherwise.
    • getEnumeratorDefinition

      Get the definition of an enumerator.
      Parameters:
      configuration - The enumerator configuration.
      Returns:
      The enumerator definition or null if the property is not enumerated.
    • getContentTypeId

      In case of a Content reference field, the content type ID.
      Returns:
      the content type ID.
    • isSearchable

      default boolean isSearchable()
      Get if the property can be searched on (i.e. used in a SearchCriterion).
      Returns:
      true if the property can be searched on, false otherwise.
    • isDisplayable

      default boolean isDisplayable()
      Get if the property can be displayed (i.e. used in a ResultField).
      Returns:
      true if the property can be displayed, false otherwise.
    • isSortable

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

      default boolean isFacetable()
      Gets if the property can be facetable
      Returns:
      true if the property can be facetable, false otherwise.
    • getQuery

      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 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.
    • getWidget

      default String getWidget()
      Get the default widget to use when rendering this property as a criterion.
      Returns:
      The default widget to use, or null if no specific widget is necessary.
    • getWidgetParameters

      Get the widget parameters.
      Parameters:
      configuration - The system property configuration
      Returns:
      The widget parameters as a Map.
    • getRenderer

      default String getRenderer()
      Get the renderer.
      Returns:
      The column renderer.
    • getConverter

      default String getConverter()
      Get the property column converter.
      Returns:
      The property column converter.
    • getColumnWidth

      Get the column width.
      Returns:
      the default column width, can be null.
    • index

      void index(Content content, org.apache.solr.common.SolrInputDocument document)
      Index the system property in a solr document.
      Parameters:
      content - The content to index.
      document - The solr document to index into.
    • getSearchField

      Get the SearchField representing this system property.
      Returns:
      The search field representing this system property.
    • getValue

      Get the typed raw value for this field in the given result content. The returned object depends on this field's type:
      - MetadataType.STRING must return String or String[] if multiple
      - MetadataType.DATE or MetadataType.DATETIME must return Date or Date[] if multiple
      - MetadataType.LONG must return Long or Long[] if multiple
      - MetadataType.DOUBLE must return Double or Double[] if multiple
      - MetadataType.CONTENT must return String or String[] if multiple
      - MetadataType.GEOCODE must return Map<String, Double>
      - MetadataType.USER must return UserIdentity or UserIdentity[] if multiple
      - MetadataType.MULTILINGUAL_STRING must return MultilingualString
      Others types are not supported.
      Parameters:
      content - The result content
      Returns:
      The typed value, cast to the appropriate object according its type.
    • getJsonValue

      default Object getJsonValue(Content content, boolean full)
      Get the jsonified value
      Parameters:
      content - the result content
      full - true to get full value.
      Returns:
      the content field value
    • saxValue

      void saxValue(ContentHandler handler, Content content) throws SAXException
      SAX the value
      Parameters:
      handler - The content handler to sax into
      content - The content
      Throws:
      SAXException - If an error occurred while saxing
    • getSortValue

      default Object getSortValue(Content content)
      Get the sort value represented by this field in the given result content.
      Parameters:
      content - the result content.
      Returns:
      the content sort value, must be scalar (String, long, double, Date).
    • getSchemaDefinitions

      Get the schema definitions brought by this property.
      Returns:
      The schema definitions used by this property.