Class ContextManager

java.lang.Object
com.itextpdf.commons.actions.contexts.ContextManager

public class ContextManager extends Object
The class that retrieves context of its invocation.
  • Field Details

  • Constructor Details

    • ContextManager

      ContextManager()
  • Method Details

    • getInstance

      public static ContextManager getInstance()
      Gets the singleton instance of this class.
      Returns:
      the ContextManager instance
    • getContext

      public IContext getContext(Class<?> clazz)
      Gets the context associated with the passed class object. The context is determined by class namespace.
      Parameters:
      clazz - the class for which the context will be determined.
      Returns:
      the IContext associated with the class, or null if the class is unknown.
    • getContext

      public IContext getContext(String className)
      Gets the context associated with the passed class object. The context is determined by class namespace.
      Parameters:
      className - the class name with the namespace for which the context will be determined.
      Returns:
      the IContext associated with the class, or null if the class is unknown.
    • getRecognisedNamespace

      String getRecognisedNamespace(String className)
    • unregisterContext

      void unregisterContext(Collection<String> namespaces)
    • getNamespaceMapping

      private IContext getNamespaceMapping(String namespace)
    • registerGenericContext

      void registerGenericContext(Collection<String> namespaces, Collection<String> products)
    • normalize

      private static String normalize(String namespace)