Breaking Changes to latest docker images

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 with org.openremote.model.attribute.AttributeInfo (imports or inline usages)
  • Serialised AttributeEvent.assetState property has now been removed and AttributeEvent.ref and AttributeEvent.value should be used instead (deserialisation of AttributeEvents using the old assetState field in JSON are still supported for now TBR)
  • AttributeEvent.getAttributeRef() renamed AttributeEvent.getRef()
    • AttributeEvent.getAttributeState() renamed AttributeEvent.getState()
  • AttributeRef.getAttributeName()renamedAttributeRef.getName()
  • Protocol.updateLinkedAttribute() methods - AttributeState now removed, use AttributeRef and value instead
  • AbstractProtocol.doLinkedAttributeWrite(Attribute<?> attribute, U agentLink, AttributeEvent event, Object processedValue) refactored to AbstractProtocol.doLinkedAttributeWrite(U agentLink, AttributeEvent event, Object processedValue) as AttributeEvent now contains all required data
  • AbstractIOClientProtocol.createWriteMessage(Attribute<?> attribute, DefaultAgentLink agentLink, AttributeEvent event, Object processedValue) refactored to AbstractIOClientProtocol.createWriteMessage(DefaultAgentLink agentLink, AttributeEvent event, Object processedValue)
  • ProtocolUtil.bytesFromHexString(msg) and ProtocolUtil.bytesFromBinaryString(msg) moved to ValueUtil
  • AssetEvent.getAssetId() refactored to AssetEvent.getId()
  • Frontend code that uses AttributeEvents now must use ref and value instead of attributeState.ref and attributeState.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("/", ":")
        }

2 Likes