use of org.freeplane.plugin.script.ScriptingPermissions in project freeplane by freeplane.
the class ScriptAddOnProperties method parseScripts.
private List<Script> parseScripts(Vector<XMLElement> xmlElements) {
final ArrayList<Script> scripts = new ArrayList<Script>();
if (xmlElements == null || xmlElements.isEmpty())
return scripts;
for (XMLElement scriptXmlNode : xmlElements.get(0).getChildren()) {
final Script script = new Script();
for (Entry<Object, Object> entry : scriptXmlNode.getAttributes().entrySet()) {
if (entry.getKey().equals("name")) {
script.name = (String) entry.getValue();
} else if (entry.getKey().equals("executionMode")) {
script.executionMode = parseExecutionMode(entry.getValue().toString());
} else if (entry.getKey().equals("menuTitleKey")) {
script.menuTitleKey = entry.getValue().toString();
} else if (entry.getKey().equals("menuLocation")) {
script.menuLocation = entry.getValue().toString();
}
}
script.permissions = new ScriptingPermissions(scriptXmlNode.getAttributes());
scripts.add(script);
}
return scripts;
}
Aggregations