Exemplo n.º 1
0
 @Override
 public void runScript(IPathState pathState) {
   final IModuleContext ctx = pathState.createModuleContext();
   try {
     final Object[] args = new Object[] {new ModuleContextJS(ctx)};
     Context cx = Context.enter();
     Scriptable instance = module.createInstanceScope(cx);
     module.runModule(cx, instance, args, pathState.toString());
   } catch (WrappedException e) {
     logger.log(
         Level.WARNING,
         new RhinoExceptionFormatter("Wrapped exception running module script", e).toString());
   } catch (RhinoException e) {
     logger.warning(new RhinoExceptionFormatter("Exception running module script.", e).toString());
   } finally {
     Context.exit();
   }
 }
Exemplo n.º 2
0
 @Override
 public IScannerModuleRunningTime getRunningTimeProfile() {
   return module.getRunningTime();
 }
Exemplo n.º 3
0
 @Override
 public String getModuleCategoryName() {
   return module.getCategoryName();
 }
Exemplo n.º 4
0
 @Override
 public String getModuleName() {
   return module.getModuleName();
 }
Exemplo n.º 5
0
 @Override
 public boolean isEnabled() {
   return module.getEnabledState();
 }
Exemplo n.º 6
0
 @Override
 public void setEnabled(boolean flag) {
   module.setEnabledState(flag);
 }