Desktop Client Data Layer
This page documents the desktop-side entity model that mirrors Nuxeo-backed documents, archives, people, organizations, and metadata definitions.
Purpose
The desktop client data layer is the transport and persistence model used by the desktop runtime. It is responsible for mapping Nuxeo documents into editable Java entities and for converting entity state back into request properties when the client creates or updates content.
Scope
This page covers the shared desktop entity model in suredms-desktop-client-data. It does not cover the desktop connector runtime or remote API transport, which are documented separately.
Entry Points
SC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/BaseEntity.javaSC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/Archive.javaSC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/Document.javaSC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/Person.javaSC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/Organization.javaSC/suredms-desktop-client-data/src/main/java/com/sureclinical/suredms/entity/DataPropertyDef.java
Primary Components
BaseEntityis the shared base class for desktop entities. It stores the backing Nuxeo document, common Dublin Core fields, modified/trash state, request-property generation, and document creation helpers.Archiverepresents a study or drive archive. It stores the archive identifier, name, content model version, duplication policy, numbering scheme, and lock state.Documentrepresents a persisted archive document. It links to archive, content type, organization, person, form, signatures, lifecycle state, and discrepancy data.Personmodels contact records and tracks names, role, organization, addresses, country, and activation state.Organizationmodels company or site records and tracks role, primary person, location, time zone, and lock state.DataPropertyDefdefines configurable metadata fields, required flags, and visibility rules used by archive content models.
Data Flow
- The desktop client creates entity instances through the registered factory in each type.
- The entity loads values from a Nuxeo document in
loadPropsandloadDublinCodePropertiesFromDoc. - When the user creates or updates an item, the entity writes a
PropertyMapthroughsetRequestProperties. BaseEntitythen creates or updates the remote document through the automation client.
Key Behaviors
- Each concrete entity registers itself with the factory registry so the runtime can instantiate the correct type from a Nuxeo document type.
- Entities keep transient UI state separate from persisted state, especially for loaded children, annotations, and cached references.
DocumentandArchiveexpose product-specific properties such as training flags, controlled-document state, duplication policy, and content model data.PersonandOrganizationmaintain both the persisted archive link and the desktop-friendly display fields used in forms and lists.
Dependencies and Integrations
- The entities depend on the Nuxeo automation client for document creation, update, and blob retrieval.
- Shared utility classes such as
RemoteExceptionHelper,EnumUtils, andStringUtilskeep the entity code compact. - The data layer feeds the desktop workflow, quality, signing, and connector modules through the same domain objects.
Edge Cases and Constraints
- Some entity classes still support older field names or legacy mappings for compatibility with archived data.
DocumentandArchiveare not UI models; they are persistence-aware data contracts.- Many fields are marked modified when setters are called so the client can decide whether a save is required.