Skip to main content

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.java
  • SC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/BaseEntryPoint.java
  • SC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/endpoints/EndPoints.java
  • SC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/xml/XMLParser.java
  • SC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/xml/XMLEndPoints.java
  • SC/suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/nuxeo

Primary Components

  • BaseLauncher is 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.
  • BaseEntryPoint is 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.
  • EndPoints is the connector factory. It selects local, remote, or demo endpoint implementations and also exposes the document updater behavior used by the desktop runtime.
  • XMLParser reads local XML archive exports and maps them into desktop entity objects such as archives, documents, persons, organizations, content types, and metadata definitions.
  • XMLEndPoints and the Nuxeo endpoint classes provide the concrete transport layer used by the desktop client.

Runtime Flow

  1. The launcher starts the desktop process, logs runtime details, and converts command-line arguments into applet-style parameters.
  2. The entry point is created and initialized.
  3. The desktop client instance is brought up and the UI frame is created on the Swing thread.
  4. The endpoint factory chooses local XML, remote Nuxeo, or demo mode based on the login type.
  5. 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

  • XMLParser depends on the shared entity model from suredms-desktop-client-data.
  • NuxeoClientImpl and the remote endpoint classes provide server connectivity.
  • DeploymentUtils, LookAndFeelManager, UiThreadPool, and DesktopClient handle 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 -open file 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 ClassDescription
ActionOpenArchiveFromFilePrompts for a local .save or SureArchive file, parses it via XMLParser, and loads it as a local-mode drive
ActionOpenArchiveFromNetworkConnects 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 ClassBuilderDescription
ActionSaveSureDriveToFileExportWizardBuilderLaunches the export wizard for the current SureDrive; produces a local .save / SureArchive file

Builder: SC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/ui/wizard/exporter/study/ExportWizardBuilder.java

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

Builder: SC/suredms-desktop-client/src/main/java/com/sureclinical/suredms/ui/wizard/exporter/contentmodel/ContentModelExportWizardBuilder.java

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 ValueBehaviour
NO_RESTRICTIONSDuplicate names allowed
UNIQUE_CASE_INSENSITIVENames must be unique (case-insensitive comparison)
UNIQUE_CASE_SENSITIVENames 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.