List<String> result = _affinityGroupService.listAffinityGroupTypes();
ListResponse<AffinityGroupTypeResponse> response = new ListResponse<AffinityGroupTypeResponse>();
ArrayList<AffinityGroupTypeResponse> responses = new ArrayList<AffinityGroupTypeResponse>();
if (result != null) {
for (String type : result) {
AffinityGroupTypeResponse affinityTypeResponse = new AffinityGroupTypeResponse();
affinityTypeResponse.setType(type);
affinityTypeResponse.setObjectName("affinityGroupType");
responses.add(affinityTypeResponse);
}
}
response.setResponses(responses);
response.setResponseName(getCommandName());