ScriptingSecurityManager getScriptingSecurityManager() {
   final ScriptingSecurityManager scriptingSecurityManager;
   // get preferences (and store them again after the script execution,
   // such that the scripts are not able to change them).
   final ScriptingPermissions permissions = permissions();
   permissions.assertScriptExecutionAllowed();
   final boolean executeSignedScripts = permissions.isExecuteSignedScriptsWithoutRestriction();
   if (executeSignedScripts && isSignedScript()) {
     scriptingSecurityManager = permissions.getPermissiveScriptingSecurityManager();
   } else {
     scriptingSecurityManager = permissions.getScriptingSecurityManager();
   }
   return scriptingSecurityManager;
 }
 public Object executeScript(
     final int pIndex, final PrintStream pOutStream, final IErrorHandler pErrorHandler) {
   final String script = getScript(pIndex).getScript();
   ModeController mMindMapController = Controller.getCurrentModeController();
   return ScriptingEngine.executeScript(
       mMindMapController.getMapController().getSelectedNode(),
       script,
       pErrorHandler,
       pOutStream,
       null,
       ScriptingPermissions.getPermissiveScriptingPermissions());
 }
 public Object executeScript(
     final int pIndex, final PrintStream pOutStream, final IErrorHandler pErrorHandler) {
   final ModeController modeController = Controller.getCurrentModeController();
   // the script is completely in the hand of the user -> no security issues.
   final ScriptingPermissions restrictedPermissions =
       ScriptingPermissions.getPermissiveScriptingPermissions();
   return ScriptingEngine.executeScript(
       modeController.getMapController().getSelectedNode(),
       mScript,
       pErrorHandler,
       pOutStream,
       null,
       restrictedPermissions);
 }