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
AssetStateshould be replaced withorg.openremote.model.attribute.AttributeInfo(imports or inline usages) - Serialised
AttributeEvent.assetStateproperty has now been removed andAttributeEvent.refandAttributeEvent.valueshould be used instead (deserialisation ofAttributeEventsusing the oldassetStatefield in JSON are still supported for now TBR) AttributeEvent.getAttributeRef()renamedAttributeEvent.getRef()-
AttributeEvent.getAttributeState()renamedAttributeEvent.getState()
AttributeRef.getAttributeName()renamedAttributeRef.getName()Protocol.updateLinkedAttribute()methods -AttributeStatenow removed, useAttributeRefandvalueinsteadAbstractProtocol.doLinkedAttributeWrite(Attribute<?> attribute, U agentLink, AttributeEvent event, Object processedValue)refactored toAbstractProtocol.doLinkedAttributeWrite(U agentLink, AttributeEvent event, Object processedValue)asAttributeEventnow 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 toValueUtilAssetEvent.getAssetId()refactored toAssetEvent.getId()- Frontend code that uses
AttributeEventsnow must userefandvalueinstead ofattributeState.refandattributeState.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.gradleto:
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("/", ":")
}