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
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the control ID.
    Get a maximum value to limit the output to.
    Get a minimum value to limit the output to.
    boolean
    Test if this instance has a valid configuration.
    of(String controlId)
    Create a new configuration instance.
    void
    setControlId(String controlId)
    Set the control ID.
    void
    Set a maximum value to limit the output to.
    void
    Set a minimum value to limit the output to.
    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.

    Methods inherited from class net.solarnetwork.node.service.support.ExpressionConfig

    expressionReferenceLink, getDatumPropertyType, getDatumPropertyTypeKey, getExpression, getExpression, getExpressionServiceId, getName, setDatumPropertyType, setDatumPropertyTypeKey, setExpression, setExpressionServiceId, setName, settings, toSettingValues

    Methods inherited from class net.solarnetwork.domain.datum.DatumSamplePropertyConfig

    getConfig, getPropertyKey, getPropertyType, getPropertyTypeKey, setConfig, setPropertyKey, setPropertyType, setPropertyTypeKey, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 use
      expressionServices - the available expression services
      Returns:
      the settings, never null
    • of

      public static ControlPropertyConfig of(String controlId)
      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

      public String getControlId()
      Get the control ID.
      Returns:
      the control ID
    • setControlId

      public void setControlId(String controlId)
      Set the control ID.
      Parameters:
      controlId - the control ID to set
    • getMinValue

      public BigDecimal getMinValue()
      Get a minimum value to limit the output to.
      Returns:
      the minimum value
    • setMinValue

      public void setMinValue(BigDecimal minValue)
      Set a minimum value to limit the output to.
      Parameters:
      minValue - the minimum value to set, or null for no limit
    • getMaxValue

      public BigDecimal getMaxValue()
      Get a maximum value to limit the output to.
      Returns:
      the maximum value
    • setMaxValue

      public void setMaxValue(BigDecimal maxValue)
      Set a maximum value to limit the output to.
      Parameters:
      maxValue - the maximum value to set, or null for no limit