Changed API methods for Java users - BlueCat Address Manager - 9.0.0

Address Manager API Guide

Locale
English (United States)
Product name
BlueCat Address Manager
Version
9.0.0

This section lists changed API methods for Java users.

Address Manager API methods will no longer return or accept an array element such as APIEntity[] and APIDeploymentOption[].

An array element has been replaced by an array object. Refer to the following table for the list of array elements replaced:
Array element Replaced array object
APIEntity[] APIEntityArray
APIAccessRight[] APIAccessRightArray
APIDeploymentOption[] APIDeploymentOptionArray
APIDeploymentRole[] APIDeploymentRoleArray
APIUserDefinedField[] APIUserDefinedFieldArray
long[] com.bluecatnetworks.proteus.api.client.java.proxy.LongArray
String[] com.bluecatnetworks.proteus.api.client.java.proxy.StringArray

Input type example

An array element ([]) input type has been changed to an array object. For example, long[] can be replaced with LongArray. Refer to the following code example:
// Create array[] element containing actual values that need to be send in request
Long[] subBlockIds = { subblock1Id, subblock2Id };
// Create new Array object
LongArray subBlocks = new LongArray();
// Add values in array element in Array object
subBlocks.getItem().addAll( Arrays.asList( subBlockIds ) );
// send Array object as part of request.
service.mergeBlocksWithParent( subBlocks );

Return type example

An array element ([]) return type has been changed to an array object. For example, APIEntity[] is replaced with APIEntityArray. Refer to the following code example:
// Get the Array object from the response
APIEntityArray apiEntityArray = service.getEntities( configId, ObjectTypes.IP4Block, 0, 10 );
// Get actual values in Array object as list
List<APIEntity> apiEntities = apiEntityArray.getItem();
// Iterate through above list to get APIEntity object
for( APIEntity apiEntity : apiEntities )
{
	printEntity( apiEntity );
}