Latest docker image has the following breaking changes note in particular the need to update groovy rules (most of these only affect java code extensions):
- Any groovy rules that directly used
AssetState
should be replaced withorg.openremote.model.attribute.AttributeInfo
(imports or inline usages) - Serialised
AttributeEvent.assetState
property has now been removed andAttributeEvent.ref
andAttributeEvent.value
should be used instead (deserialisation ofAttributeEvents
using the oldassetState
field in JSON are still supported for now TBR) AttributeEvent.getAttributeRef()
renamedAttributeEvent.getRef()
-
AttributeEvent.getAttributeState()
renamedAttributeEvent.getState()
AttributeRef
.getAttributeName()renamed
AttributeRef.getName()
Protocol.updateLinkedAttribute()
methods -AttributeState
now removed, useAttributeRef
andvalue
insteadAbstractProtocol.doLinkedAttributeWrite(Attribute<?> attribute, U agentLink, AttributeEvent event, Object processedValue)
refactored toAbstractProtocol.doLinkedAttributeWrite(U agentLink, AttributeEvent event, Object processedValue)
asAttributeEvent
now contains all required dataAbstractIOClientProtocol.createWriteMessage(Attribute<?> attribute, DefaultAgentLink agentLink, AttributeEvent event, Object processedValue)
refactored toAbstractIOClientProtocol.createWriteMessage(DefaultAgentLink agentLink, AttributeEvent event, Object processedValue)
ProtocolUtil.bytesFromHexString(msg)
andProtocolUtil.bytesFromBinaryString(msg)
moved toValueUtil
AssetEvent.getAssetId()
refactored toAssetEvent.getId()
- Frontend code that uses
AttributeEvents
now must useref
andvalue
instead ofattributeState.ref
andattributeState.value
If using custom project template then the following changes are also needed:
- Add the following to
gradle.properties
:
typescriptGeneratorVersion = 3.2.1263
- Change
settings.gradle
to:
plugins {
id "com.cherryperry.gradle-file-encrypt" version "2.0.3" apply false
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.3" apply false
id 'cz.habarta.typescript-generator' version "$typescriptGeneratorVersion" apply false
}
rootProject.name = "$projectName"
// Include sub-projects dynamically, every directory with a build.gradle (and no .buildignore)
fileTree(dir: rootDir, include: "**/build.gradle", excludes: ["**/node_modules/**", "**/generic_app/**"])
.filter { it.parent != rootDir }
.filter { !file("${it.parent}/.buildignore").exists() }
.each {
include it.parent.replace(rootDir.canonicalPath, "").replace("\\", ":").replace("/", ":")
}