Package org.openremote.manager.asset
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 Summary
FieldsModifier and TypeFieldDescriptionprotected AgentServiceprotected AssetProcessingServiceprotected AssetStorageServiceprotected GatewayServiceFields inherited from interface org.openremote.model.ContainerService
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertValueForLinkedAttribute(AssetStorageService assetStorageService, org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink attributeLink) doSpecialConversion(AssetStorageService assetStorageService, org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink.ConverterType converter, org.openremote.model.attribute.AttributeRef linkedAttributeRef) protected static Optional<org.openremote.model.attribute.Attribute<?>> getAttribute(AssetStorageService assetStorageService, String realm, org.openremote.model.attribute.AttributeRef attributeRef) protected static Optional<org.openremote.model.attribute.AttributeLink.ConverterType> getSpecialConverter(Object value) voidinit(org.openremote.model.Container container) voidonAttributeEvent(org.openremote.model.attribute.AttributeEvent event) protected voidprocessLinkedAttributeUpdate(org.openremote.model.attribute.AttributeInfo attributeInfo, org.openremote.model.attribute.AttributeLink attributeLink) protected voidsendAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent) voidstart(org.openremote.model.Container container) voidstop(org.openremote.model.Container container) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openremote.model.ContainerService
getPriority
-
Field Details
-
assetProcessingService
-
assetStorageService
-
agentService
-
gatewayService
-
-
Constructor Details
-
AttributeLinkingService
public AttributeLinkingService()
-
-
Method Details
-
init
- Specified by:
initin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
start
- Specified by:
startin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.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
-
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
-