Java clients are equipped with a wrapper class EntityPropertieswhich will help in forming the propertiesStringby specifying various properties forming the name value.
Add in Java
long parentZoneId; //Id of the parent Zone EntityProperties properties = new EntityProperties(); properties.addProperty("TextUDF", "testTextValue"); properties.addProperty("IntegerUDF", "1005"); String propertyString = properties.getPropertiesString(); long zoneId = service.addZone( parentZoneId, "example.abc.com", propertyString );
Update in Java
APIEntity zone = service.getEntityById( zoneId ); EntityProperties properties = new EntityProperties(zone.getProperties()); // Populate with the existing values and then update the only properties which need to be modified. properties.addProperty("TextUDF", "testTextValue"); properties.addProperty("IntegerUDF", "1005"); zone.setProperties(properties.getPropertiesString()); service.update(zone);