new Node_Type[resultList.size()]);
}
private static Node_Type getOneNodeResponse(NodeStatus node) {
final Node_Type xmlNode = new Node_Type();
/* identities */
final List<IdentityProvides_Type> xmlIdentsList = new ArrayList<IdentityProvides_Type>(3);
for (Identity ident : node.getIdentities()) {
if (ident != null) {
xmlIdentsList.add(idToXML(ident));
}
}
final IdentityProvides_Type[] xmlIdents =
xmlIdentsList.toArray(
new IdentityProvides_Type[xmlIdentsList.size()]);
xmlNode.setIdentity(xmlIdents);
/* status */
if (node.isOkOccurred()) {
xmlNode.setExited(true);
xmlNode.setOk(true);
} else if (node.isErrorOccurred()) {
xmlNode.setExited(true);
xmlNode.setErrorCode(node.getErrorCode());
xmlNode.setErrorMessage(node.getErrorMessage());
} else {
xmlNode.setExited(false);
}
return xmlNode;
}