Class ControlPropertyConfig
java.lang.Object
net.solarnetwork.domain.datum.DatumSamplePropertyConfig<String>
net.solarnetwork.node.service.support.ExpressionConfig
net.solarnetwork.node.control.datumreactor.ControlPropertyConfig
public class ControlPropertyConfig
extends net.solarnetwork.node.service.support.ExpressionConfig
Configuration for a single datum property associate with a managed control.
The DatumSamplePropertyConfig.getConfig() value represents the expression.
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the control ID.Get a maximum value to limit the output to.Get a minimum value to limit the output to.booleanisValid()Test if this instance has a valid configuration.static ControlPropertyConfigCreate a new configuration instance.voidsetControlId(String controlId) Set the control ID.voidsetMaxValue(BigDecimal maxValue) Set a maximum value to limit the output to.voidsetMinValue(BigDecimal minValue) Set a minimum value to limit the output to.static List<net.solarnetwork.settings.SettingSpecifier> Get settings suitable for configuring an instance of this class.Methods inherited from class net.solarnetwork.node.service.support.ExpressionConfig
expressionReferenceLink, getDatumPropertyType, getDatumPropertyTypeKey, getExpression, getExpression, getExpressionServiceId, getName, setDatumPropertyType, setDatumPropertyTypeKey, setExpression, setExpressionServiceId, setName, settings, toSettingValuesMethods inherited from class net.solarnetwork.domain.datum.DatumSamplePropertyConfig
getConfig, getPropertyKey, getPropertyType, getPropertyTypeKey, setConfig, setPropertyKey, setPropertyType, setPropertyTypeKey, toString
-
Constructor Details
-
ControlPropertyConfig
public ControlPropertyConfig()Constructor.
-
-
Method Details
-
settings
public static List<net.solarnetwork.settings.SettingSpecifier> settings(String prefix, Iterable<net.solarnetwork.service.ExpressionService> expressionServices) Get settings suitable for configuring an instance of this class.- Parameters:
prefix- a setting key prefix to useexpressionServices- the available expression services- Returns:
- the settings, never null
-
of
Create a new configuration instance.- Parameters:
controlId- the control ID- Returns:
- the configuration, never null
-
isValid
public boolean isValid()Test if this instance has a valid configuration.This method simply verifies the minimum level of configuration is available for the control to be used.
- Returns:
- true if this configuration is valid for use
-
getControlId
Get the control ID.- Returns:
- the control ID
-
setControlId
Set the control ID.- Parameters:
controlId- the control ID to set
-
getMinValue
Get a minimum value to limit the output to.- Returns:
- the minimum value
-
setMinValue
Set a minimum value to limit the output to.- Parameters:
minValue- the minimum value to set, or null for no limit
-
getMaxValue
Get a maximum value to limit the output to.- Returns:
- the maximum value
-
setMaxValue
Set a maximum value to limit the output to.- Parameters:
maxValue- the maximum value to set, or null for no limit
-