return node;
}
public Object visitPermission(UIPermission perm, Principal relatedPrincipal) throws Exception {
XMLNode node = new XMLNode(PERMISSION, currentNode);
node.addAttribute(PERMISSION_ATTR_PERMISSION_CLASS, perm.getClass().getName());
node.addAttribute(PERMISSION_ATTR_ACTIONS, perm.getActions());
node.addAttribute(PERMISSION_ATTR_PRINCIPAL_CLASS, perm.getRelatedPrincipal().getClass().getName());
node.addAttribute(PERMISSION_ATTR_PRINCIPAL, perm.getRelatedPrincipal().getName());
node.addAttribute(PERMISSION_ATTR_READONLY, Boolean.toString(perm.isReadOnly()));
currentNode.addChild(node);