}
ReadResourceModel result = (ReadResourceModel) response.getResult();
List<TreeNode> children = new ArrayList<TreeNode>(result.getChildren().size());
for (String siteName : result.getChildren()) {
TreeNode siteNode = new TreeNode(siteName);
siteNode.setExportable(true);
siteNode.setType(siteType);
siteNode.setSiteName(siteName);
children.add(siteNode);
}
return new TreeNode(siteType, children);
} catch (Exception e) {
log.error("Exception getting site type " + siteType + " node.", e);
throw e;
}
}