Class BaseIdentifiable

java.lang.Object
net.solarnetwork.service.support.BasicIdentifiable
net.solarnetwork.node.service.support.BaseIdentifiable
All Implemented Interfaces:
net.solarnetwork.service.Identifiable
Direct Known Subclasses:
BackupJob, BaseDatumFilterSupport, DatumDaoBulkUploadJob, DatumDaoCleanerJob, DatumDataSourcePollManagedJob, DatumDataSourceSupport, DefaultDatumQueue, DefaultOperationalModesService, DefaultSecurityTokenService, HttpClientSupport, JsonDatumObjectCodec, SimpleManagedJob, SimpleNodeControlsService, SimpleNodeSettingsService

public abstract class BaseIdentifiable extends net.solarnetwork.service.support.BasicIdentifiable implements net.solarnetwork.service.Identifiable
Extension of BasicIdentifiable with node-specific helpers.

This class is meant to be extended by more useful services.

Since:
1.67
Version:
2.0
Author:
matt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.slf4j.Logger
    A class-level logger.

    Fields inherited from interface net.solarnetwork.service.Identifiable

    GROUP_UID_PROPERTY, UID_PROPERTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<net.solarnetwork.settings.SettingSpecifier>
    Get settings for the configurable properties of BasicIdentifiable.
    static List<net.solarnetwork.settings.SettingSpecifier>
    baseIdentifiableSettings(String prefix, String defaultUid, String defaultGroupUid)
    Get settings for the configurable properties of BasicIdentifiable.
    net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService>
    Get an optional collection of ExpressionService.
    net.solarnetwork.service.OptionalService<PlaceholderService>
    Get the placeholder service to use.
    protected void
    populateExpressionDatumProperties(net.solarnetwork.domain.datum.MutableDatumSamplesOperations d, ExpressionConfig[] expressionConfs, Object root)
    Evaluate a set of expression configurations and store the results as properties on a datum.
    protected String
    Resolve placeholders using the configured PlaceholderService.
    protected String
    resolvePlaceholders(String s, Map<String,?> parameters)
    Resolve placeholders using the configured PlaceholderService.
    void
    setExpressionServices(net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> expressionServices)
    Configure an optional collection of ExpressionService.
    void
    setPlaceholderService(net.solarnetwork.service.OptionalService<PlaceholderService> placeholderService)
    Set the placeholder service to use.

    Methods inherited from class net.solarnetwork.service.support.BasicIdentifiable

    basicIdentifiableMetadataSettings, basicIdentifiableSettings, basicIdentifiableSettings, basicIdentifiableSettings, doubleMetadataValue, getDisplayName, getGroupUid, getGroupUID, getMessageSource, getMetadata, getMetadataCount, getUid, getUID, integerMetadataValue, metadataValue, numberMetadataValue, saveMetadataValue, saveMetadataValue, setDisplayName, setGroupUid, setGroupUID, setMessageSource, setMetadata, setMetadataCount, setUid, setUID, smartMetadataValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.solarnetwork.service.Identifiable

    getDisplayName, getGroupUid, getUid
  • Field Details

    • log

      protected final org.slf4j.Logger log
      A class-level logger.
      Since:
      1.4
  • Constructor Details

    • BaseIdentifiable

      public BaseIdentifiable()
      Default constructor.
  • Method Details

    • baseIdentifiableSettings

      public static List<net.solarnetwork.settings.SettingSpecifier> baseIdentifiableSettings(String prefix)
      Get settings for the configurable properties of BasicIdentifiable.

      Empty strings are used for the default uid and groupUid setting values.

      Parameters:
      prefix - an optional prefix to include in all setting keys
      Returns:
      the settings
      See Also:
    • baseIdentifiableSettings

      public static List<net.solarnetwork.settings.SettingSpecifier> baseIdentifiableSettings(String prefix, String defaultUid, String defaultGroupUid)
      Get settings for the configurable properties of BasicIdentifiable.
      Parameters:
      prefix - an optional prefix to include in all setting keys
      defaultUid - the default uid value to use
      defaultGroupUid - the default groupUid value to use
      Returns:
      the settings
      Since:
      1.1
    • resolvePlaceholders

      protected String resolvePlaceholders(String s)
      Resolve placeholders using the configured PlaceholderService.
      Parameters:
      s - the string to resolve placeholder values on
      Returns:
      the resolved string, or null if s is null
      Since:
      1.3
    • resolvePlaceholders

      protected String resolvePlaceholders(String s, Map<String,?> parameters)
      Resolve placeholders using the configured PlaceholderService.
      Parameters:
      s - the string to resolve placeholder values on
      parameters - optional parameters to use, or null
      Returns:
      the resolved string, or null if s is null
      Since:
      1.3
    • populateExpressionDatumProperties

      protected void populateExpressionDatumProperties(net.solarnetwork.domain.datum.MutableDatumSamplesOperations d, ExpressionConfig[] expressionConfs, Object root)
      Evaluate a set of expression configurations and store the results as properties on a datum.
      Parameters:
      d - the datum to store the results of expression evaluations on
      expressionConfs - the expression configurations
      root - the expression root object
      Since:
      1.4
    • getPlaceholderService

      public net.solarnetwork.service.OptionalService<PlaceholderService> getPlaceholderService()
      Get the placeholder service to use.
      Returns:
      the service
      Since:
      1.3
    • setPlaceholderService

      public void setPlaceholderService(net.solarnetwork.service.OptionalService<PlaceholderService> placeholderService)
      Set the placeholder service to use.
      Parameters:
      placeholderService - the service to set
      Since:
      1.3
    • getExpressionServices

      public net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> getExpressionServices()
      Get an optional collection of ExpressionService.
      Returns:
      the optional ExpressionService collection to use
      Since:
      1.4
    • setExpressionServices

      public void setExpressionServices(net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> expressionServices)
      Configure an optional collection of ExpressionService.
      Parameters:
      expressionServices - the optional ExpressionService collection to use
      Since:
      1.4