Interface ISecurityCheck

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface ISecurityCheck
Interface used for security callbacks. Callbacks can be registered to append additional checks for certain script engine actions.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Interface Description
    static class  ISecurityCheck.ActionType  
  • Method Summary

    Modifier and Type Method Description
    boolean doIt​(ISecurityCheck.ActionType action, Object... data)
    Verification to be performed before a certain engine action is executed.
  • Method Details

    • doIt

      boolean doIt​(ISecurityCheck.ActionType action, Object... data) throws SecurityException
      Verification to be performed before a certain engine action is executed.

      For ISecurityCheck.ActionType.INJECT_CODE following parameters are provided: data[0] ... Script instance data[1] ... boolean indicator if script should be run in the UI thread

      When false is returned the action will be silently skipped if possible. On SecurityExceptions the exception message will be provided as user feedback.
      Parameters:
      action - type of action to be performed
      data - optional data assigned to that action
      Returns:
      true when action can be performed
      Throws:
      SecurityException - to provide a dedicated error message to the user