Updates the session info object with the information from
the given request context.<p>

@param context the request context to update the session with
12558
protected void update(CmsRequestContext context) {

        m_timeUpdated = System.currentTimeMillis();
        m_siteRoot = context.getSiteRoot();
        setProject(context.getCurrentProject().getUuid());
        m_ouFqn = context.getOuFqn();
    }
288736
public static void putCredential(final RequestContext context, final Credential c) {
        if (c == null) {
            context.getRequestScope().remove(PARAMETER_CREDENTIAL);
            context.getFlowScope().remove(PARAMETER_CREDENTIAL);
            context.getConversationScope().remove(PARAMETER_CREDENTIAL);
        } else {
            context.getRequestScope().put(PARAMETER_CREDENTIAL, c);
            context.getFlowScope().put(PARAMETER_CREDENTIAL, c);
            context.getConversationScope().put(PARAMETER_CREDENTIAL, c);
        }
    }
63122
public void changeScope(@Nullable final ThreadDelegatedContext context)
    {
        final ThreadDelegatedContext oldContext = threadLocal.get();
        if (oldContext != null) {
            if (oldContext == context) {
                // If the context gets exchanged with itself, do nothing.
                return;
            }
            else {
                // This must not clear the context. It might still be
                // referenced by another thread.
                oldContext.event(ScopeEvent.LEAVE);
            }
        }

        if (context != null) {
            threadLocal.set(context);
            context.event(ScopeEvent.ENTER);
        }
        else {
            threadLocal.remove();
        }
    }
1001546
protected void modified(ComponentContext context, Map<String, Object> properties) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "modified", "context=" + context);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "modified", "properties=" + properties);
        }
        configurationProperties = properties;
    }
283038
@Override
	public void updateContext() {

		// Find the path to add
		String copyInstancePath = "/" + this.replicatedInstancePath.replaceFirst( "/[^/]+$", this.newInstanceName );
		Map<String,String> pathToAdd = new HashMap<> ();

		for( Map.Entry<String,String> entry : this.context.instancePathToComponentName.entrySet()) {
			if( ! entry.getKey().startsWith( this.replicatedInstancePath + "/" )
					&& ! entry.getKey().equals( this.replicatedInstancePath ))
				continue;

			String updatedPath = entry.getKey().replace( this.replicatedInstancePath, copyInstancePath );
			pathToAdd.put( updatedPath, entry.getValue());
		}

		// Update them
		this.context.instancePathToComponentName.putAll( pathToAdd );
	}
91055
public void associate(HttpSession context) {
		try {
			context.setAttribute(COMPONENTS, new ConcurrentHashMap<Descriptor<?>, Object>());
		} catch (Exception e) {
			logger.debug("HTTP session is disabled or invalid in the current environment", e);
		}
	}
1100494
@Activate
    protected void activate(ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            Tr.event(tc, "activate", context);
    }
296943
public void setContextInfo(CmsContextInfo contextInfo) {

        checkFrozen();
        if (contextInfo == null) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTEXT_INFO_0));
        }
        m_context = contextInfo;
    }
222491
@Override
	public void updateContext() {

		String newValue = replaceVariables( this.value, this.context, this.instancePath );
		if( newValue != null ) {
			this.context.variables.put( this.key, newValue );
		}

		// When not resolved, we disable it.
		// We also replace it by a mock value so that we can perform
		// validation. It implies populating the context.
		else {
			setDisabled( true );
			this.context.disabledVariables.add( this.key );
			this.context.variables.put( this.key, "fake" );
			String path = "/fake";
			if( this.instancePath != null )
				path = this.instancePath + path;

			this.context.instancePathToComponentName.put( path, FAKE_COMPONENT_NAME );
		}
	}
589798
public void addContextParam(final WebAppInitParam contextParam) {
		NullArgumentException.validateNotNull(contextParam, "Context param");
		NullArgumentException.validateNotNull(contextParam.getParamName(),
				"Context param name");
		NullArgumentException.validateNotNull(contextParam.getParamValue(),
				"Context param value");
		contextParams.add(contextParam);
	}
300585
public void setContext(Context context) {
        context.put(JavacElements.class, this);
        javaCompiler = JavaCompiler.instance(context);
        syms = Symtab.instance(context);
        names = Names.instance(context);
        types = Types.instance(context);
        enter = Enter.instance(context);
    }
122354
public function mergeServletContext(ServletContextInterface $context)
    {

        // check if the context has his own session parameters
        if ($context->hasSessionParameters() === true) {
            if (($garbageCollectionProbability = $context->getSessionParameter(ServletSessionInterface::GARBAGE_COLLECTION_PROBABILITY)) !== null) {
                $this->setGarbageCollectionProbability((float) $garbageCollectionProbability);
            }

            if (($sessionName = $context->getSessionParameter(ServletSessionInterface::SESSION_NAME)) !== null) {
                $this->setSessionName($sessionName);
            }

            if (($sessionFilePrefix = $context->getSessionParameter(ServletSessionInterface::SESSION_FILE_PREFIX)) !== null) {
                $this->setSessionFilePrefix($sessionFilePrefix);
            }

            if (($sessionSavePath = $context->getSessionParameter(ServletSessionInterface::SESSION_SAVE_PATH)) !== null) {
                $this->setSessionSavePath($sessionSavePath);
            }

            if (($sessionMaximumAge = $context->getSessionParameter(ServletSessionInterface::SESSION_MAXIMUM_AGE)) !== null) {
                $this->setSessionMaximumAge((integer) $sessionMaximumAge);
            }

            if (($sessionInactivityTimeout = $context->getSessionParameter(ServletSessionInterface::SESSION_INACTIVITY_TIMEOUT)) !== null) {
                $this->setInactivityTimeout((integer) $sessionInactivityTimeout);
            }

            if (($sessionCookieLifetime = $context->getSessionParameter(ServletSessionInterface::SESSION_COOKIE_LIFETIME)) !== null) {
                $this->setSessionCookieLifetime((integer) $sessionCookieLifetime);
            }

            if (($sessionCookieDomain = $context->getSessionParameter(ServletSessionInterface::SESSION_COOKIE_DOMAIN)) !== null) {
                $this->setSessionCookieDomain($sessionCookieDomain);
            }

            if (($sessionCookiePath = $context->getSessionParameter(ServletSessionInterface::SESSION_COOKIE_PATH)) !== null) {
                $this->setSessionCookiePath($sessionCookiePath);
            }

            if (($sessionCookieSecure = $context->getSessionParameter(ServletSessionInterface::SESSION_COOKIE_SECURE)) !== null) {
                $this->setSessionCookieSecure((boolean) $sessionCookieSecure);
            }

            if (($sessionCookieHttpOnly = $context->getSessionParameter(ServletSessionInterface::SESSION_COOKIE_HTTP_ONLY)) !== null) {
                $this->setSessionCookieHttpOnly((boolean) $sessionCookieHttpOnly);
            }
        }
    }
1173920
@Override
    public void initialize(BeanContext context) {
        Resource resource = ConsoleUtil.getConsoleResource(context);
        initialize(context, ResourceHandle.use(resource));
    }
247072
protected void addSessionInfo(CmsSessionInfo sessionInfo) {

        if (getUserSessionMode() == UserSessionMode.standard) {
            m_sessionStorageProvider.put(sessionInfo);
        } else if (getUserSessionMode() == UserSessionMode.single) {
            CmsUUID userId = sessionInfo.getUserId();
            List<CmsSessionInfo> infos = getSessionInfos(userId);
            if (infos.isEmpty()
                || ((infos.size() == 1) && infos.get(0).getSessionId().equals(sessionInfo.getSessionId()))) {
                m_sessionStorageProvider.put(sessionInfo);
            } else {
                throw new RuntimeException("Can't create another session for the same user.");
            }
        }
    }
83767
protected void modified(ComponentContext context) {
        Dictionary<String, ?> newProperties = context.getProperties();
        modified(newProperties, true);
    }
707057
@Override
    public boolean updateContext(IQueryContext context) {
        boolean result = false;
        
        for (IQueryFilter<T> filter : filters) {
            result |= filter.updateContext(context);
        }
        
        return result;
    }
929601
public void addMoreContext(CacheContext context) {
		Object cached = context.get(CacheContext.SECURITY_CONTEXT_KEY);
		if (cached == null) {
			SavedAuthorization sa = securityContext.getSavedAuthorization();
			log.debug("Storing SavedAuthorization {}", sa);
			context.put(CacheContext.SECURITY_CONTEXT_KEY, sa);
		}
	}