Class UnknownContext

java.lang.Object
com.itextpdf.commons.actions.contexts.UnknownContext
All Implemented Interfaces:
IContext

public class UnknownContext extends Object implements IContext
The fallback IContext.
  • Field Details

    • RESTRICTIVE

      public static final IContext RESTRICTIVE
      The IContext that forbids all events.
    • PERMISSIVE

      public static final IContext PERMISSIVE
      The IContext that allows all events.
  • Constructor Details

    • UnknownContext

      public UnknownContext (boolean allowEvents)
      Creates a fallback IContext.
      Parameters:
      allowEvents - defines whether the context allows all events or not
  • Method Details

    • isAllowed

      public boolean isAllowed (AbstractContextBasedITextEvent event)
      Depending on its internal state allows or rejects all event. Behaviour is defined via constructor UnknownContext(boolean)
      Specified by:
      isAllowed in interface IContext
      Parameters:
      event - is an event to test
      Returns:
      true if event is allowed by the actual context and false otherwise