Java API Examples - BlueCat Address Manager - 9.0.0

Address Manager API Guide

prodname
BlueCat Address Manager
version_custom
9.0.0

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);