public class ClientProfileSettingsHelper
extends java.lang.Object
implements de.ipcon.db.core.StrukturParameterDefaultApplierI
Encapsulates parsing, querying, mutating, and persisting user and group profile
settings in Benutzer, decoupling UI coordinators from direct XML DOM handling.
| Constructor and Description |
|---|
ClientProfileSettingsHelper(ClientContextI _ctx,
SessionI _session,
ClientDialogHelper _dialogHelper,
ClientServerEventHandler _serverEventHandler)
Constructs a new settings helper bound to the active client runtime.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyDefaults(electric.xml.Element e,
java.lang.Object[] l10nPath) |
void |
applyMultiWindowManagerLayout()
Configures the user profile for multi-window manager mode and persists preferences.
|
void |
applySingleWindowManagerLayout()
Configures the user profile for single-window manager mode and persists preferences.
|
java.awt.geom.Rectangle2D.Double |
getInitialWindowBounds()
Resolves the stored window bounds rectangle from the profile.
|
int |
getInitialWindowState()
Resolves the initial extended window state from user profile settings.
|
java.util.List<electric.xml.Element> |
getPluginConfigurations()
Returns the list of configured plugin XML elements from the active profile.
|
de.ipcon.swing.WindowManagerType |
getWindowManagerType()
Resolves the configured window manager type from the user profile.
|
boolean |
hasNonDefaultGuiTheme()
Indicates whether the user profile defines a custom GUI theme that differs from the default theme.
|
void |
loadSettingsFromProfiles(boolean reload)
Loads and applies settings across prioritized group profiles and individual user preferences.
|
void |
loadSettingsFromProfiles(electric.xml.Element elProfile,
boolean reload)
Loads and applies settings from a specific profile element and merges group defaults.
|
void |
onLogon()
Initializes user preferences and profile configurations upon successful authentication.
|
void |
processLoginScript(java.lang.String executionPhase,
boolean executeUntimed)
Dispatches and runs lifecycle scripts defined in the user and group profile configurations.
|
void |
reloadProfile()
Reloads the authenticated user’s profile from the database and reapplies all settings.
|
void |
resetGuiThemeToDefault()
Resets the profile's configured GUI theme to the platform default and persists preferences.
|
de.ipcon.swing.ThemeWrapper |
resolveConfiguredTheme(ClientLoginDialog cld,
float lastZoom)
Resolves and populates the Look and Feel theme according to profile settings and user preferences.
|
java.lang.Integer |
resolveConfiguredWindowState()
Extracts and parses the window state attribute from the profile, if present and valid.
|
void |
saveUserPreferences(ClientStateSaveReason reason)
Persists the active user preferences into the persistent user BO (
Benutzer)
within a dedicated transaction. |
void |
saveWindowPosition(de.ipcon.swing.WindowState state)
Records the live window geometry and state in the user profile and persists preferences.
|
public ClientProfileSettingsHelper(ClientContextI _ctx, SessionI _session, ClientDialogHelper _dialogHelper, ClientServerEventHandler _serverEventHandler)
_ctx - context providing access to loaders, sessions, and environment services_session - current active user session_dialogHelper - helper for presenting user dialogs and error alerts_serverEventHandler - handler for server push events and broadcast messagespublic void onLogon()
Retrieves the active authenticated user from the session, parses their serialized preference XML document, and triggers the loading of prioritized group profiles and defaults.
java.lang.IllegalArgumentException - if the user is set and its preferences XML string is malformedpublic void reloadProfile()
Fetches an uncached instance of the current user to guarantee latest state, re-initializes preferences, and triggers profile reconfiguration across groups.
public void loadSettingsFromProfiles(boolean reload)
Merges script hooks, message display rules, and bookmark/form defaults. Settings from higher-priority groups override lower-priority groups, while user-specific settings take final precedence.
reload - true to force a fresh fetch from the server; false to use cached profile datapublic void loadSettingsFromProfiles(electric.xml.Element elProfile,
boolean reload)
elProfile - XML profile element containing settings to applyreload - true to force a fresh fetch from the server; false to use cached profile datapublic void saveUserPreferences(ClientStateSaveReason reason)
Benutzer)
within a dedicated transaction.
Serializes the in-memory preferences payload to the Voreinstellungen field
of the user BO, commits the transaction, and updates the session's cached user instance.
reason - the trigger context defining the cause of this save operationpublic void processLoginScript(java.lang.String executionPhase,
boolean executeUntimed)
Traverses configured profile script elements (such as VoreinstellungenElemente)
and evaluates matching scripts within the active client interpreter environment. Script execution
proceeds on a best-effort basis and requires an active backend server connection.
executionPhase - lifecycle timing phase trigger to match (e.g. 'gui.login' or 'gui.logoff')executeUntimed - if true, scripts lacking an explicit phase definition are also evaluatedpublic void applyDefaults(electric.xml.Element e,
java.lang.Object[] l10nPath)
applyDefaults in interface de.ipcon.db.core.StrukturParameterDefaultApplierIpublic de.ipcon.swing.ThemeWrapper resolveConfiguredTheme(ClientLoginDialog cld, float lastZoom)
Determines the target theme from login selections, stored preferences, or platform defaults, and applies window decoration flags, zoom factors, and SVG icon settings before returning it.
cld - optional login dialog reference; may be nulllastZoom - previously cached zoom factor; non-positive values fall back to defaultsThemeWrapper ready for application, or null if no theme could be resolvedpublic boolean hasNonDefaultGuiTheme()
true if a non-default theme is explicitly configured; false otherwisepublic void resetGuiThemeToDefault()
public de.ipcon.swing.WindowManagerType getWindowManagerType()
WindowManagerType, or null if none is configured or matches.public void applySingleWindowManagerLayout()
Replaces existing MDI desktop plugin configurations with standard single-window manager and navigation tree plugins, resets window position and state attributes to maximized defaults, and saves the updated preferences.
public void applyMultiWindowManagerLayout()
Replaces existing MDI desktop plugin configurations with a native window manager, main toolbar, and centered navigation tree plugin, adjusts default window geometry for multi-window workflows, and saves the updated preferences.
public int getInitialWindowState()
Inspects the WindowPosition profile configuration for an explicit state attribute.
Falls back to mode-specific defaults: maximized for single-window manager mode, or normal state
for multi-window manager mode.
Frame.MAXIMIZED_BOTH or Frame.NORMAL)public java.lang.Integer resolveConfiguredWindowState()
public java.awt.geom.Rectangle2D.Double getInitialWindowBounds()
Rectangle2D.Double, or null if missing or incompletepublic void saveWindowPosition(de.ipcon.swing.WindowState state)
Updates the WindowPosition element attributes with current coordinates and extended state.
Omits explicit width or height attributes when the window is maximized along the corresponding axis.
This prevents Mutter/GNOME from serializing 100% screen bounds as normal window geometry, which
triggers its legacy fullscreen heuristic ("Quake III" behavior) and breaks un-maximization
(see ticket 197127922).
state - live snapshot of window bounds and extended state; ignored if nullpublic java.util.List<electric.xml.Element> getPluginConfigurations()
Element instances representing declared plugins; empty list if none or if profile is nullCopyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.