Cumulocity API Services / com.softwareag.jc.cumulocity.services.models.extension / PropertiesBase / registerCustomAttributeClass

registerCustomAttributeClass

fun registerCustomAttributeClass(name: String, namespaceForPackageAndClass: String): Unit

Allows you to register your own custom classes to manage custom structures found in Cumulocity assets.

Parameters

name - Must match the name of the complex structure referenced by the JSON object returned by Cumulocity. Alternatively if you want to use this to encapsulate simple values, specify a prefix. The first value found starting with this prefix call the constructor of your class providing the JSONObject containing the custom attribute. Prefix must start with 'x' e.g. 'xPlanning'

namespaceForPackageAndClass - full namespace of your class including its package location Your class must provide a constructor that take a single JSONObject parameter.