/** * Get the session scope from the current request scope. * * @param bCreateIfNotExisting * if <code>true</code> a new session scope (and a new HTTP session if * required) is created if none is existing so far. * @return <code>null</code> if no session scope is present, and none should * be created. */ @Nullable public static ISessionWebScope getSessionScope (final boolean bCreateIfNotExisting) { return internalGetSessionScope (bCreateIfNotExisting, false); }
/** * Get the session scope from the current request scope. * * @param bCreateIfNotExisting * if <code>true</code> a new session scope (and a new HTTP session if * required) is created if none is existing so far. * @param bItsOkayToCreateANewSession * if <code>true</code> no warning is emitted, if a new session scope * must be created. This is e.g. used when renewing a session. * @return <code>null</code> if no session scope is present, and none should * be created. */ @Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (final boolean bCreateIfNotExisting, final boolean bItsOkayToCreateANewSession) { // Try to to resolve the current request scope final IRequestWebScope aRequestScope = getRequestScopeOrNull (); return internalGetSessionScope (aRequestScope, bCreateIfNotExisting, bItsOkayToCreateANewSession); }
final ISessionWebScope aNewSessionScope = WebScopeManager.internalGetSessionScope (true, true); _restoreScopeAttributes (aNewSessionScope, aSessionScopeValues); return EChange.CHANGED;