Class GenericContext

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

public class GenericContext extends Object implements IContext
Generic context that allows AbstractContextBasedITextEvent based on the whitelist of supported events.
  • Constructor Details

    • GenericContext

      public GenericContext (Collection<String> supportedProducts)
      Creates a Generic Context instance with support of provided namespaces and products.
      Parameters:
      supportedProducts - is a collection of supported products
  • Method Details

    • isAllowed

      public boolean isAllowed (AbstractContextBasedITextEvent event)
      Checks if the source product of the event is supported by the context.
      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