Gets the context map, either from a cache or from the VFS if it'S not already cached.<p>

@return the context map
554499
@SuppressWarnings("unchecked")
    private Map<String, CmsTemplateContext> getContextMap() {

        Object cachedObj = m_cache.getCachedObject(m_cms, getConfigurationPropertyPath());
        if (cachedObj != null) {
            return (Map<String, CmsTemplateContext>)cachedObj;
        } else {
            try {
                Map<String, CmsTemplateContext> map = initMap();
                m_cache.putCachedObject(m_cms, getConfigurationPropertyPath(), map);
                return map;
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
                return Collections.emptyMap();
            }
        }

    }
486401
public final Map<String, String> getHeadersMap() {
        if (networkRequest != null && networkRequest.headers != null) {
            return networkRequest.headers.toMap();
        }
        return Collections.emptyMap();
    }
1038555
public Map getDestinationContext()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getDestinationContext");
      
    Map context = foreignDest.getDefinition().getDestinationContext();
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getDestinationContext", context);
      
    return context;
  }
505929
public Map<?, ?> getByContainer() {

        if (m_byContainer == null) {
            m_byContainer = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {

                public Object transform(Object arg0) {

                    String key = (String)arg0;
                    CmsContainerBean container = m_page.getContainers().get(key);
                    if (container == null) {
                        return Collections.emptyList();
                    } else {
                        return container.getElements();
                    }
                }
            });
        }
        return m_byContainer;
    }
937187
private Map getDialogObjectMap() {

        Map objects = (Map)getSettings().getDialogObject();
        if (objects == null) {
            // using hashtable as most efficient version of a synchronized map
            objects = new Hashtable();
            getSettings().setDialogObject(objects);
        }
        return objects;
    }
1329628
public Map<String, Context> getJndiContexts() {
        Map<String, Context> jndiContexts = new HashMap<>();
        jndiContexts.putAll(additionalJndiContexts);
        jndiContexts.put("default", defaultJndiContext);
        return jndiContexts;
    }
173257
public static JKContext getCurrentContext() {
		JKContext context = (JKContext) JKThreadLocal.getValue(JKContextConstants.JK_CONTEXT);
		if (context == null) {
			context = getInstance().createDesktopContext();
			JKThreadLocal.setValue(JKContextConstants.JK_CONTEXT, context);
		}
		return context;
	}
764733
Object getServletContextForCurrentClassLoader() {
        Object result;
        FactoryManagerCacheKey key = new FactoryManagerCacheKey(null, getClassLoader(), applicationMap);
        result = key.getContext();
        
        return result;
    }
276824
protected void getMappedHelpUri() {

        try {
            getJsp().getRequestContext().setCurrentProject(m_onlineProject);
            if (CmsStringUtil.isNotEmpty(getParamWorkplaceresource())) {
                // found a workplace resource parameter, try to get a mapping for it
                String helpResource = null;
                String wpResource = getParamWorkplaceresource();
                int xmlPageId;
                try {
                    xmlPageId = OpenCms.getResourceManager().getResourceType(
                        CmsResourceTypeXmlPage.getStaticTypeName()).getTypeId();
                } catch (CmsLoaderException e1) {
                    xmlPageId = CmsResourceTypeXmlPage.getStaticTypeId();
                }
                if (getCms().existsResource(
                    resolveMacros(getParamWorkplaceresource()),
                    CmsResourceFilter.requireType(xmlPageId))) {
                    // given workplace resource is a page in VFS, use it as start point
                    helpResource = resolveMacros(getParamWorkplaceresource());
                    setParamHomelink(getJsp().link(helpResource));
                } else {
                    // given workplace resource does not exist, resolve mapping
                    try {

                        // try to read the mappings from the current module
                        String absolutePath = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(
                            resolveMacros(RFS_HELPMAPPINGS));
                        CmsParameterConfiguration props = new CmsParameterConfiguration(absolutePath);

                        // remove context from workplace path
                        wpResource = CmsLinkManager.removeOpenCmsContext(wpResource);

                        // determine mapping for workplace resource
                        while ((wpResource != null) && CmsStringUtil.isEmpty(helpResource)) {
                            helpResource = props.getString(wpResource, null);
                            wpResource = CmsResource.getParentFolder(wpResource);
                        }
                    } catch (IOException e) {
                        // no mappings found in module, ignore
                    }

                    if (CmsStringUtil.isEmpty(helpResource)) {
                        // no mapping found, use default help URI
                        helpResource = DEFAULT_HELPFILE;
                    }
                    // create path to the help resource
                    helpResource = resolveMacros(PATH_HELP) + helpResource;
                    if (!getCms().existsResource(helpResource, CmsResourceFilter.IGNORE_EXPIRATION)) {
                        helpResource = resolveMacros(PATH_HELP) + DEFAULT_HELPFILE;
                    }
                    setParamHomelink(getJsp().link(resolveMacros(PATH_HELP) + DEFAULT_HELPFILE));
                }
                // set URI to found help page URI
                getJsp().getRequestContext().setUri(helpResource);
            }

        } finally {
            getJsp().getRequestContext().setCurrentProject(m_offlineProject);
        }
    }
1034046
@Override
    public <K extends Serializable, V> Map<K, V> getCache() {
        return this.getCache(DEFAULT);
    }
1097518
public ServletContext getServletContext()
    {
        RequestContext reqContext = peekRequestContext();
        if (reqContext == null)
            return null;

        return  reqContext._context;
    }
765680
private Configuration getConfFromContext() {
    Configuration conf = (Configuration)getServletContext().getAttribute(
        HttpServer.CONF_CONTEXT_ATTRIBUTE);
    assert conf != null;
    return conf;
  }
433824
public String getStaticResourceContext() {

        if (m_staticResourcePathFragment == null) {
            m_staticResourcePathFragment = CmsStaticResourceHandler.getStaticResourceContext(
                OpenCms.getStaticExportManager().getVfsPrefix(),
                getVersionNumber());
        }
        return m_staticResourcePathFragment;
    }
354519
@NonNull public Context getContext() {
        if (searchView != null) {
            return searchView.getContext();
        } else if (supportView != null) {
            return supportView.getContext();
        }
        throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
    }
984248
private Map<String, String> getInfoMap() {

        Map<String, String> infos = new LinkedHashMap<String, String>();
        int corruptedSites = getCorruptedSites().size();
        infos.put(
            CmsVaadinUtils.getMessageText(Messages.GUI_SITE_STATISTICS_NUM_WEBSITES_0),
            String.valueOf(getAllElements().size() + corruptedSites));

        if (corruptedSites > 0) {
            infos.put(
                CmsVaadinUtils.getMessageText(Messages.GUI_SITE_STATISTICS_NUM_CORRUPTED_WEBSITES_0),
                String.valueOf(corruptedSites));
        }

        return infos;
    }
506153
public Map<String, Object> getContextData() // d644886
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        Map<String, Object> contextData;
        if (isLifecycleMethodActive()) // d704496
        {
            if (ivLifecycleContextData == null)
            {
                ivLifecycleContextData = new HashMap<String, Object>();

                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "getContextData: created empty");
            }
            else
            {
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "getContextData: lifecycle");
            }

            contextData = ivLifecycleContextData;
        }
        else
        {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "getContextData: method");

            EJSDeployedSupport s = getMethodContext();
            if (s == null)
            {
                IllegalStateException ex = new IllegalStateException(
                                "Context data not available outside the scope of an EJB or lifecycle callback method");
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "getContextData: " + ex);
                throw ex;
            }

            contextData = s.getContextData();
        }

        return contextData;
    }
352303
public static Map<String, String> getKeywordMap(ApplicationContext context) {
        Map<String, String> keywordToBeanMap = new HashMap<String, String>();

        // Retrieve beans implementing the Keyword interface.
        String[] beanNames = context.getBeanNamesForType(Keyword.class);

        for (String beanName : beanNames) {
            Object bean = context.getBean(beanName);

            // Retrieve keyword information
            KeywordInfo keywordInfo = AnnotationUtils.findAnnotation(bean.getClass(), KeywordInfo.class);

            // Set keyword name as specified in the keyword info, or if information is not available, use bean name.
            String keywordName = keywordInfo != null ? keywordInfo.name() : beanName;

            if (keywordToBeanMap.put(keywordName, beanName) != null) {
                // If map already contains the keyword name, throw an exception. Keywords should be unique.
                throw new RuntimeException("Multiple definitions for keyword '" + keywordName + "' exists.");
            }
        }

        return keywordToBeanMap;
    }