addLibAsChild(xmlElement);
return xmlElement;
}
private void addScriptsAsChild(XMLElement parent) {
XMLElement xmlElement = new XMLElement("scripts");
for (Script script : scripts) {
XMLElement scriptXmlElement = new XMLElement("script");
scriptXmlElement.setAttribute("name", script.name);
scriptXmlElement.setAttribute("menuTitleKey", script.menuTitleKey);
scriptXmlElement.setAttribute("menuLocation", script.menuLocation);
scriptXmlElement.setAttribute("executionMode", script.executionMode.toString());
final List<String> permissionNames = ScriptingPermissions.getPermissionNames();
for (String permission : permissionNames) {
scriptXmlElement.setAttribute(permission, Boolean.toString(script.permissions.get(permission)));
}
xmlElement.addChild(scriptXmlElement);
}
parent.addChild(xmlElement);
}