Desktop Connector and Runtime
This page documents the desktop launch path and the connector layer that bridges the desktop client to local XML data, remote Nuxeo services, and on-disk archives.
Purpose
The desktop connector runtime decides how the desktop application starts, which endpoint mode is active, and how desktop actions are routed to local or remote services.
Scope
This page covers launcher, entry-point, and endpoint composition for the desktop client. It does not cover the workflow UI or entity model details, which are documented on their own pages.
Entry Points
SC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/BaseLauncher.javaSC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/BaseEntryPoint.javaSC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/endpoints/EndPoints.javaSC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/xml/XMLParser.javaSC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/xml/XMLEndPoints.javaSC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/nuxeo
Primary Components
BaseLauncheris the desktop bootstrap class. It initializes folders, applies platform-specific workarounds, creates the entry point, configures the main frame, and shuts the application down safely.BaseEntryPointis the applet-style entry point used by the desktop runtime. It exposes the command-line parameter map, default service host/path values, and codebase handling.EndPointsis the connector factory. It selects local, remote, or demo endpoint implementations and also exposes the document updater behavior used by the desktop runtime.XMLParserreads local XML archive exports and maps them into desktop entity objects such as archives, documents, persons, organizations, content types, and metadata definitions.XMLEndPointsand the Nuxeo endpoint classes provide the concrete transport layer used by the desktop client.
Runtime Flow
- The launcher starts the desktop process, logs runtime details, and converts command-line arguments into applet-style parameters.
- The entry point is created and initialized.
- The desktop client instance is brought up and the UI frame is created on the Swing thread.
- The endpoint factory chooses local XML, remote Nuxeo, or demo mode based on the login type.
- Document updates are routed through the current endpoint implementation so local archives and remote repositories behave consistently.
Endpoint Behavior
- Local mode reads file roots from the configured path list and uses XML archive parsing.
- Remote mode opens the configured Nuxeo base URL and routes document actions to the server.
- Demo mode uses a separate endpoint set for sample or development data.
- When Nuxeo is not attached, the document updater falls back to local archive persistence and event firing.
Dependencies and Integrations
XMLParserdepends on the shared entity model fromsuredms-desktop-client-data.NuxeoClientImpland the remote endpoint classes provide server connectivity.DeploymentUtils,LookAndFeelManager,UiThreadPool, andDesktopClienthandle runtime UI setup and application lifecycle concerns.
Edge Cases and Constraints
- The launcher must initialize logging and folders very early in startup.
- The desktop app supports test mode, autologin, and
-openfile handling. - Local archives and remote Nuxeo mode share the same higher-level entity contracts, but persistence happens through different back ends.
Desktop SureDrive Operations
This section documents the SureDrive-specific operations available in the desktop client that go beyond the web client: opening an archive from a local file, saving (exporting) a SureDrive to file, content model export, and the archive configuration policies that are set at drive creation.
Opening a SureDrive from File
The desktop ribbon exposes two archive-open actions:
| Action Class | Description |
|---|---|
ActionOpenArchiveFromFile | Prompts for a local .save or SureArchive file, parses it via XMLParser, and loads it as a local-mode drive |
ActionOpenArchiveFromNetwork | Connects to a configured remote Nuxeo instance and fetches the selected SureDrive over the network |
Both actions initialize the desktop client in the appropriate endpoint mode (local XML vs. remote Nuxeo) once the archive is identified.
Source: SC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/
Saving a SureDrive to File
| Action Class | Builder | Description |
|---|---|---|
ActionSaveSureDriveToFile | ExportWizardBuilder | Launches the export wizard for the current SureDrive; produces a local .save / SureArchive file |
The wizard allows the user to select which folders and document types to include in the export and choose the output path.
Content Model Export Wizard
A separate wizard for exporting only the Content Model (folder structure, metadata terms, content type definitions) without the document payload. This allows sharing or reusing a CME configuration across multiple SureDrive instances.
Archive Entity — Desktop-Specific Configuration
File: SC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/Archive.java
The Archive entity holds several configuration fields that are set during drive creation and can be managed from the desktop client but are not directly exposed in the web CME:
Duplication Policy
Controls whether duplicate document names are permitted within the archive.
| Policy Value | Behaviour |
|---|---|
NO_RESTRICTIONS | Duplicate names allowed |
UNIQUE_CASE_INSENSITIVE | Names must be unique (case-insensitive comparison) |
UNIQUE_CASE_SENSITIVE | Names must be unique (case-sensitive comparison) |
Field declaration: private DuplicationPolicy duplicationPolicy = DuplicationPolicy.defaultValue();
The policy is set via SureDriveNameStep during desktop drive creation (SureDriveWizardContext).
Lock State
The desktop entity mirrors the web lock model:
private boolean locked = false;
private ArchiveLock lock = null;
When locked = true, the ArchiveLock object records who locked the archive and when. The desktop client reads this state to gate all write operations.