Class SessionManager

java.lang.Object
com.developer.nefarious.zjoule.plugin.auth.SessionManager

public abstract class SessionManager extends Object
Manages the user's session within the application. The SessionManager class provides static methods for login, logout, and session state verification. It interacts with various memory components and the browser to manage user sessions.
  • Method Details

    • isUserLoggedIn

      public static boolean isUserLoggedIn()
    • isSapSession

      public static boolean isSapSession()
    • isOllamaSession

      public static boolean isOllamaSession()
    • login

      public static void login(org.eclipse.swt.browser.Browser browser)
      Executes the login process using the specified browser. This method triggers the `login()` JavaScript function in the browser and updates the associated tags using the TagHandler.
      Parameters:
      browser - the Browser instance to execute the login process.
    • logout

      public static void logout(org.eclipse.swt.browser.Browser browser, EclipseMemory eclipseMemory)
      Executes the logout process using the specified browser and clears all memory. The method triggers the `logout()` JavaScript function in the browser and clears all user-related data from the EclipseMemory.
      Parameters:
      browser - the Browser instance to execute the logout process. If the browser is null or disposed, no JavaScript execution occurs.
      eclipseMemory - the EclipseMemory instance used to clear all memory.
    • clearAllSessions

      public static void clearAllSessions()