Skip to content

Making changes to the SOA model and API

Jeremie Guillemotte edited this page May 17, 2013 · 4 revisions

Making changes to the SOA model and API

This page lists the different steps that might be needed when making changes to the model and the Discovery API.

General information

Model configuration

The EasySOA model extends the base Nuxeo model, whose configuration is in the contribution [CoreExtensions.xml] (http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewComponent/org.nuxeo.ecm.core.CoreExtensions).

The current EasySOA model (still alpha) is configured & available in [easysoa-registry-core] (https://github.com/easysoa/EasySOA-Incubation/tree/master/easysoa-registry-v1/easysoa-registry-doctypes-core) at :

Extending the model

The model can be further extended by providing Nuxeo bundles defining new data schemas and model contributions, as shown in the Nuxeo Book Model Tutorial.

Case 1: Adding/changing a property from a document type

Registry core

Registry layout

Discovery API

  • Update the doctypes Java classes to match the updated schema.
    • Property constants
    • getPropertyList() method

Case 2: Adding a new document type

Registry core

  • Create one or several XSD schemas.
  • Create the document definition (core-type-contrib.xml).

Registry layout

  • Define the document widgets (one per property) & layouts (layout-(doctype)-contrib.xml).
    • Don't forget to update the META-INF/MANIFEST.MF.
  • Set where the document can be created and how layouts are displayed (ecm-type-contrib.xml).
  • Update the localization files.
  • Update (if required) the web templates (will at least include incl/tabs/easysoa_content_view.xhtml and incl/tabs/easysoa_document_view.xhtml).

Discovery API

To be updated for EasySOA Reghistry V1

  • Create a class in easysoa-common, package org.easysoa.doctypes to describe the document in Java.
  • Complete the DocumentService (to implement creation and finding helpers) and the DiscoveryService (to allow for discovery notifications).
  • Create the REST entry point in DiscoveryRest.
  • Update the API by editing the RestNotificationFactory.
Clone this wiki locally