Class AbstractSystemProperty

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.search.systemprop.AbstractSystemProperty
All Implemented Interfaces:
SystemProperty, LogEnabled, PluginAware, Configurable, Serviceable
Direct Known Subclasses:
AbstractUserSystemProperty, CollectionsSystemProperty, CommentsSystemProperty, ContentPrivacySystemProperty, ContentTypeSystemProperty, CreationDateSystemProperty, FirstValidationSystemProperty, FulltextSystemProperty, LanguageSystemProperty, LastMajorValidationSystemProperty, LastModifiedSystemProperty, LastValidationSystemProperty, OrphanSystemProperty, PagesSystemProperty, ParentContentSystemProperty, SharedSystemProperty, SiteSystemProperty, SiteTypeSystemProperty, TagsSystemProperty, WorkflowStepSystemProperty

Abstract class providing standard behavior and helper methods for a SystemProperty.
  • Field Details

  • Constructor Details

  • Method Details

    • setPluginInfo

      public void setPluginInfo(String pluginName, String featureName, String id)
      Description copied from interface: PluginAware
      Sets the plugin info relative to the current component.
      Note : The feature name may be null if the targeted component in declared at plugin level.
      Specified by:
      setPluginInfo in interface PluginAware
      Parameters:
      pluginName - Unique identifier for the plugin hosting the extension
      featureName - Unique feature identifier (unique for a given pluginName)
      id - Unique identifier of this component
    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • configure

      public void configure(Configuration configuration) throws ConfigurationException
      Specified by:
      configure in interface Configurable
      Throws:
      ConfigurationException
    • getId

      public String getId()
      Description copied from interface: SystemProperty
      Get the system property ID.
      Specified by:
      getId in interface SystemProperty
      Returns:
      The property ID.
    • getLabel

      Description copied from interface: SystemProperty
      Get the system property label.
      Specified by:
      getLabel in interface SystemProperty
      Returns:
      The property label.
    • getDescription

      Description copied from interface: SystemProperty
      Get the system property description.
      Specified by:
      getDescription in interface SystemProperty
      Returns:
      The property description.
    • index

      public void index(Content content, org.apache.solr.common.SolrInputDocument document)
      Description copied from interface: SystemProperty
      Index the system property in a solr document.
      Specified by:
      index in interface SystemProperty
      Parameters:
      content - The content to index.
      document - The solr document to index into.
    • getSortValue

      public Object getSortValue(Content content)
      Description copied from interface: SystemProperty
      Get the sort value represented by this field in the given result content.
      Specified by:
      getSortValue in interface SystemProperty
      Parameters:
      content - the result content.
      Returns:
      the content sort value, must be scalar (String, long, double, Date).
    • saxValue

      public void saxValue(ContentHandler handler, Content content) throws SAXException
      Description copied from interface: SystemProperty
      SAX the value
      Specified by:
      saxValue in interface SystemProperty
      Parameters:
      handler - The content handler to sax into
      content - The content
      Throws:
      SAXException - If an error occurred while saxing
    • getSchemaDefinitions

      Description copied from interface: SystemProperty
      Get the schema definitions brought by this property.
      Specified by:
      getSchemaDefinitions in interface SystemProperty
      Returns:
      The schema definitions used by this property.
    • _parseI18nizableText

      Parse an i18n text.
      Parameters:
      config - the configuration to use.
      pluginName - the current plugin name.
      name - the child name.
      Returns:
      the i18n text.
      Throws:
      ConfigurationException - if the configuration is not valid.
    • parseString

      protected String parseString(Object value)
      Get the value as a long.
      Parameters:
      value - The value as an object.
      Returns:
      The value as a long.
    • parseLong

      protected long parseLong(Object value)
      Get the value as a long.
      Parameters:
      value - The value as an object.
      Returns:
      The value as a long.
    • parseDouble

      protected double parseDouble(Object value)
      Get the value as a double.
      Parameters:
      value - The value as an object.
      Returns:
      The value as a double.
    • parseBoolean

      protected boolean parseBoolean(Object value)
      Get the value as a boolean.
      Parameters:
      value - The value as an object, can be a Boolean or a String.
      Returns:
      The value as a boolean.
    • parseDate

      protected AdaptableDate parseDate(Object value)
      Get the value as a date.
      Parameters:
      value - The value as an object, can be a Date or a String.
      Returns:
      The value as a Date object.
    • parseUserArray

      protected UserIdentity[] parseUserArray(Object value)
      Get the value as array of UserIdentity
      Parameters:
      value - The value to parse
      Returns:
      A array of UserIdentity
    • parseStringArray

      protected String[] parseStringArray(Object value)
      Get the value as a array of String
      Parameters:
      value - The value as an object to parse
      Returns:
      The values as a String array
    • _indexStringValues

      protected void _indexStringValues(SearchField field, String[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple String values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexStringValue

      protected void _indexStringValue(SearchField field, String value, org.apache.solr.common.SolrInputDocument document)
      Index String value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexDateValues

      protected void _indexDateValues(SearchField field, Date[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple Date values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexDateValue

      protected void _indexDateValue(SearchField field, Date value, org.apache.solr.common.SolrInputDocument document)
      Index Date value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexLongValues

      protected void _indexLongValues(SearchField field, Long[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple Long values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexLongValue

      protected void _indexLongValue(SearchField field, Long value, org.apache.solr.common.SolrInputDocument document)
      Index Long value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexDoubleValues

      protected void _indexDoubleValues(SearchField field, Double[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple Double values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexDoubleValue

      protected void _indexDoubleValue(SearchField field, Double value, org.apache.solr.common.SolrInputDocument document)
      Index Double value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexBooleanValues

      protected void _indexBooleanValues(SearchField field, Boolean[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple Boolean values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexBooleanValue

      protected void _indexBooleanValue(SearchField field, Boolean value, org.apache.solr.common.SolrInputDocument document)
      Index Boolean value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexUserValues

      protected void _indexUserValues(SearchField field, UserIdentity[] values, org.apache.solr.common.SolrInputDocument document)
      Index multiple UserIdentity values
      Parameters:
      field - The search field
      values - The values
      document - The Solr document to index into
    • _indexUserValue

      protected void _indexUserValue(SearchField field, UserIdentity value, org.apache.solr.common.SolrInputDocument document)
      Index UserIdentity value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into
    • _indexGeocodeValue

      protected void _indexGeocodeValue(SearchField field, Map<String,Double> value, org.apache.solr.common.SolrInputDocument document)
      Index geocode value
      Parameters:
      field - The search field
      value - The value
      document - The Solr document to index into