Class AttributeLinkingService

java.lang.Object
org.openremote.manager.asset.AttributeLinkingService
All Implemented Interfaces:
org.openremote.model.ContainerService

public class AttributeLinkingService extends Object implements org.openremote.model.ContainerService
This service generates new AttributeEvents for any Attribute that contains an MetaItemType.ATTRIBUTE_LINKS meta item when the Attribute is updated.

See AttributeLink for capabilities.

  • Field Details

  • Constructor Details

    • AttributeLinkingService

      public AttributeLinkingService()
  • Method Details

    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container) throws Exception
      Specified by:
      start in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • stop

      public void stop(org.openremote.model.Container container) throws Exception
      Specified by:
      stop in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • onAttributeEvent

      public void onAttributeEvent(org.openremote.model.attribute.AttributeEvent event)
    • sendAttributeEvent

      protected void sendAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent)
    • processLinkedAttributeUpdate

      protected void processLinkedAttributeUpdate(org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink attributeLink)
    • convertValueForLinkedAttribute

      protected org.openremote.model.util.Pair<Boolean,Object> convertValueForLinkedAttribute(AssetStorageService assetStorageService, org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink attributeLink) throws AssetProcessingException
      Throws:
      AssetProcessingException
    • getSpecialConverter

      protected static Optional<org.openremote.model.attribute.AttributeLink.ConverterType> getSpecialConverter(Object value)
    • doSpecialConversion

      protected static org.openremote.model.util.Pair<Boolean,Object> doSpecialConversion(AssetStorageService assetStorageService, org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink.ConverterType converter, org.openremote.model.attribute.AttributeRef linkedAttributeRef) throws RuntimeException
      Throws:
      RuntimeException
    • getAttribute

      protected static Optional<org.openremote.model.attribute.Attribute<?>> getAttribute(AssetStorageService assetStorageService, String realm, org.openremote.model.attribute.AttributeRef attributeRef)
    • toString

      public String toString()
      Overrides:
      toString in class Object