public class ClientSessionStateHelper extends AbstractClientHelper implements DBManEventListenerI, L10nLocaleChangeListenerI
| Constructor and Description |
|---|
ClientSessionStateHelper(Client _client,
java.lang.String _server,
java.lang.String _projectName,
java.lang.String _pathClientLogTxt) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClientStatusListener(ClientStatusListener l) |
void |
authenticate(java.lang.String username,
java.lang.String pass,
boolean inhibitInitFeatureManager,
java.lang.String originHash) |
void |
clearLogonDialog() |
void |
close()
Closes the client session, unsubscribes from all server and connection events,
and forcibly stops the event notifier thread.
|
void |
close(boolean processLogoffScript)
Closes this client.
|
boolean |
connectionAvailableNow() |
java.util.Date |
getDateLoggedOn() |
java.lang.String |
getPathToClientLogFile() |
SchemaI |
getSchema() |
java.lang.String |
getServerDescription() |
java.lang.String |
getServerName() |
ClientSessionStateI |
getState() |
Benutzer |
getUser() |
void |
handleError(java.lang.String msg,
java.lang.String serverName,
java.lang.Throwable t,
boolean doClose)
Helper method to avoid code redundancy.
|
void |
initLogonSubscriptions()
Subscribes to essential backend server events upon user logon.
|
void |
initSchema() |
void |
initSubsystemsOnLogon() |
boolean |
isClosed() |
boolean |
isLoggedIn() |
boolean |
isLoggingOn() |
boolean |
isShowBOProperties() |
boolean |
isShowHiddenProperties() |
boolean |
isShowHistory() |
void |
loadGlobals()
Loads global session variables and user preferences from the local machine configuration file
and applies them to the current session.
|
void |
logon() |
void |
onConnected()
Initializes necessary state immediately after a successful connection to the server is established.
|
void |
passwordChangeInLogonDialogInitiated()
Handles the event when a password change is initiated in the logon dialog.
|
void |
processDBManEvent(DBManEvent e)
Invoked when a subscribed DBManEvent occurs.
|
void |
processLocaleChanged(java.util.Locale oldLocale,
java.util.Locale newLocale)
Updates server session locale, persists the preferred locale on the current user BO,
recalculates L10n paths, and refreshes client actions.
|
boolean |
provideLogonGUI(java.lang.String _server,
java.lang.String _user,
java.lang.String _passwd,
java.lang.String _pathClientLogTxt,
PasswordChangeRequiredException pcre)
Constructs a @see de.ipcon.form.ClientLoginDialog so users may log in to the Swing-Solstice-GUI of the project.
|
void |
removeClientStatusListener(ClientStatusListener l) |
void |
requestClose()
Initiates an orderly shutdown of the client, checking for blocking conditions
and prompting the user if active plugins register close vetoes.
|
void |
resetPassword(java.lang.String username) |
void |
saveGlobals()
Saves global session variables and user preferences to the local machine configuration file.
|
void |
savePersistentSession(ClientStateSaveReason reason)
Persists the current session state and window geometry within a new transaction.
|
void |
scheduleInactivityDisconnectTimerTask()
Schedules a new ClientInactivityDisconnectTimerTask and cancels the previous one, if any.
|
void |
setShowBOProperties(boolean show) |
void |
setShowHiddenProperties(boolean show) |
void |
setShowHistory(boolean show) |
void |
startBOClassesInitializer() |
void |
startL10nPackPrefetcher()
Initiates the prefetching of localization packs.
|
clientpublic ClientSessionStateHelper(Client _client, java.lang.String _server, java.lang.String _projectName, java.lang.String _pathClientLogTxt)
public ClientSessionStateI getState()
public Benutzer getUser()
public java.lang.String getServerName()
public java.lang.String getServerDescription()
public java.lang.String getPathToClientLogFile()
public java.util.Date getDateLoggedOn()
public SchemaI getSchema()
public void initSchema()
public void processLocaleChanged(java.util.Locale oldLocale,
java.util.Locale newLocale)
processLocaleChanged in interface L10nLocaleChangeListenerIoldLocale - previous client localenewLocale - newly activated client localepublic void authenticate(java.lang.String username,
java.lang.String pass,
boolean inhibitInitFeatureManager,
java.lang.String originHash)
throws AuthenticationException,
PasswordChangeRequiredException
public boolean provideLogonGUI(java.lang.String _server,
java.lang.String _user,
java.lang.String _passwd,
java.lang.String _pathClientLogTxt,
PasswordChangeRequiredException pcre)
public void startL10nPackPrefetcher()
This method schedules the prefetching process to run on the Event Dispatch Thread (EDT)
via SPU.onEDTv(java.lang.Object, java.lang.Runnable). It is a high-level entry point that kicks off the asynchronous
loading of localization resources.
public void startBOClassesInitializer()
public void scheduleInactivityDisconnectTimerTask()
public void logon()
public void initLogonSubscriptions()
Registers direct event listeners for user-specific events rather than delegating
through Client. This keeps session-scoped cache invalidation encapsulated
within the session lifecycle:
ClientServerEventHandler.DBManBOChangeEvent for the currently authenticated
Benutzer to update local session attributes when modified externally.public void processDBManEvent(DBManEvent e)
DBManEventListenerIDBManBOChangeEvent for events triggered after modification on BOs.processDBManEvent in interface DBManEventListenerIpublic void initSubsystemsOnLogon()
throws electric.xml.ParseException
electric.xml.ParseExceptionpublic void clearLogonDialog()
public boolean isLoggingOn()
public boolean isLoggedIn()
public void resetPassword(java.lang.String username)
public void passwordChangeInLogonDialogInitiated()
When a password change is required, the user is active, so any inactivity timer needs to be stopped to prevent an accidental disconnect or timeout during the password update process. This method cancels the "inactivityDisconnectTimerTask", if it exists, to ensure the user is not disconnected prematurely.
public boolean connectionAvailableNow()
public void onConnected()
Subscribes to connection events, updates the waiting flag, and clears stale caches.
public boolean isClosed()
public void requestClose()
The shutdown sequence executes as follows:
close(1) to dispose UI resources and terminate the process.public void close()
Closes the client session, unsubscribes from all server and connection events, and forcibly stops the event notifier thread.
public void close(boolean processLogoffScript)
processLogoffScript - if true and not serverDown, then gui.logoff scripts are processed before
shutting down the client and saving globals. Defaults to false.public void saveGlobals()
Note: Currently saves to a per-machine file, not strictly per-user, due to legacy constraints. Exceptions are caught and logged without disrupting execution flow.
public void loadGlobals()
public void handleError(java.lang.String msg,
java.lang.String serverName,
java.lang.Throwable t,
boolean doClose)
public void savePersistentSession(ClientStateSaveReason reason)
If a window manager switch is pending, null is passed for the window state so that
SessionStateXml.updateWindow(WindowState, ClientStateSaveReason) preserves the target mode defaults
instead of overwriting them with the outdated active frame dimensions.
reason - the trigger context defining the cause of this save operationpublic void addClientStatusListener(ClientStatusListener l)
public void removeClientStatusListener(ClientStatusListener l)
public boolean isShowHiddenProperties()
public void setShowHiddenProperties(boolean show)
public boolean isShowBOProperties()
public void setShowBOProperties(boolean show)
public boolean isShowHistory()
public void setShowHistory(boolean show)
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.