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
FieldsFields inherited from interface net.solarnetwork.service.Identifiable
GROUP_UID_PROPERTY, UID_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<net.solarnetwork.settings.SettingSpecifier> baseIdentifiableSettings(String prefix) Get settings for the configurable properties ofBasicIdentifiable.static List<net.solarnetwork.settings.SettingSpecifier> baseIdentifiableSettings(String prefix, String defaultUid, String defaultGroupUid) Get settings for the configurable properties ofBasicIdentifiable.net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> Get an optional collection ofExpressionService.net.solarnetwork.service.OptionalService<PlaceholderService> Get the placeholder service to use.protected voidpopulateExpressionDatumProperties(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 StringResolve placeholders using the configuredPlaceholderService.protected StringresolvePlaceholders(String s, Map<String, ?> parameters) Resolve placeholders using the configuredPlaceholderService.voidsetExpressionServices(net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> expressionServices) Configure an optional collection ofExpressionService.voidsetPlaceholderService(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, smartMetadataValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.service.Identifiable
getDisplayName, getGroupUid, getUid
-
Field Details
-
log
protected final org.slf4j.Logger logA 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 ofBasicIdentifiable.Empty strings are used for the default
uidandgroupUidsetting 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 ofBasicIdentifiable.- Parameters:
prefix- an optional prefix to include in all setting keysdefaultUid- the defaultuidvalue to usedefaultGroupUid- the defaultgroupUidvalue to use- Returns:
- the settings
- Since:
- 1.1
-
resolvePlaceholders
Resolve placeholders using the configuredPlaceholderService.- Parameters:
s- the string to resolve placeholder values on- Returns:
- the resolved string, or null if
sis null - Since:
- 1.3
-
resolvePlaceholders
Resolve placeholders using the configuredPlaceholderService.- Parameters:
s- the string to resolve placeholder values onparameters- optional parameters to use, or null- Returns:
- the resolved string, or null if
sis 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 onexpressionConfs- the expression configurationsroot- the expression root object- Since:
- 1.4
-
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 ofExpressionService.- Returns:
- the optional
ExpressionServicecollection to use - Since:
- 1.4
-
setExpressionServices
public void setExpressionServices(net.solarnetwork.service.OptionalServiceCollection<net.solarnetwork.service.ExpressionService> expressionServices) Configure an optional collection ofExpressionService.- Parameters:
expressionServices- the optionalExpressionServicecollection to use- Since:
- 1.4
-