Class ContextManager


  • public class ContextManager
    extends java.lang.Object
    The class that retrieves context of its invocation.
    • Field Detail

      • contextMappings

        private final java.util.SortedMap<java.lang.String,​IContext> contextMappings
    • Constructor Detail

      • ContextManager

        ContextManager()
    • Method Detail

      • getContext

        public IContext getContext​(java.lang.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​(java.lang.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

        java.lang.String getRecognisedNamespace​(java.lang.String className)
      • unregisterContext

        void unregisterContext​(java.util.Collection<java.lang.String> namespaces)
      • getNamespaceMapping

        private IContext getNamespaceMapping​(java.lang.String namespace)
      • registerGenericContext

        void registerGenericContext​(java.util.Collection<java.lang.String> namespaces,
                                    java.util.Collection<java.lang.String> products)
      • normalize

        private static java.lang.String normalize​(java.lang.String namespace)