Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29984

Migrate Runtime Contributions to XRegistry Annotations

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.5
    • Component/s: Runtime
    • Upgrade notes:
      Hide

      See comment for a summary of changes and status for extension points.

      A big number of register/unregister API that was set on services has been removed: registries should be looked up and impacted directly (ideally working at the DOM level) instead. Related to this change, a lot of setters have been removed on descriptors, as well as merge and clone methods.

      Components are now initializing their fields depending on contributions at start time: this makes their API only available after startup, which can reveal startup dependency issues between components (that may have resulted in previously incorrect behaviour, where the service was not fully initialized with the target contributions).

      Scan importer now defines a specific endpoint for import configuration, as its contributions where breaking default importer features.
      Sample old contribution:

      <extension target="org.nuxeo.ecm.platform.importer.service.DefaultImporterComponent" point="importerConfiguration">
        <importerConfig sourceNodeClass="org.nuxeo.ecm.platform.importer.xml.parser.XMLFileSourceNode">
          <documentModelFactory documentModelFactoryClass="org.nuxeo.ecm.platform.importer.xml.parser.AdvancedScannedFileFactory" />
        </importerConfig>
      </extension>
      

      New contribution:

      <extension target="org.nuxeo.ecm.platform.scanimporter.service.ScannedFileMapperComponent" point="globalConfig">
        <config sourceNodeClass="org.nuxeo.ecm.platform.importer.xml.parser.XMLFileSourceNode"
          factoryClass="org.nuxeo.ecm.platform.importer.xml.parser.AdvancedScannedFileFactory" />
      </extension>
      
      Show
      See comment for a summary of changes and status for extension points. A big number of register/unregister API that was set on services has been removed: registries should be looked up and impacted directly (ideally working at the DOM level) instead. Related to this change, a lot of setters have been removed on descriptors, as well as merge and clone methods. Components are now initializing their fields depending on contributions at start time: this makes their API only available after startup, which can reveal startup dependency issues between components (that may have resulted in previously incorrect behaviour, where the service was not fully initialized with the target contributions). Scan importer now defines a specific endpoint for import configuration, as its contributions where breaking default importer features. Sample old contribution: <extension target="org.nuxeo.ecm.platform.importer.service.DefaultImporterComponent" point="importerConfiguration"> <importerConfig sourceNodeClass="org.nuxeo.ecm.platform.importer.xml.parser.XMLFileSourceNode"> <documentModelFactory documentModelFactoryClass="org.nuxeo.ecm.platform.importer.xml.parser.AdvancedScannedFileFactory" /> </importerConfig> </extension> New contribution: <extension target="org.nuxeo.ecm.platform.scanimporter.service.ScannedFileMapperComponent" point="globalConfig"> <config sourceNodeClass="org.nuxeo.ecm.platform.importer.xml.parser.XMLFileSourceNode" factoryClass="org.nuxeo.ecm.platform.importer.xml.parser.AdvancedScannedFileFactory" /> </extension>
    • Team:
      AT
    • Sprint:
      nxAT 11.x.32, nxAT 11.x.33, nxAT 11.x.34, nxAT 11.x.35
    • Story Points:
      8

      Description

      Follow up of work done with NXP-29580

      • most of XObject contributions extending Descriptor have been migrated to use XRegistry annotations but there are a few remaining that should also be migrated
      • all usage of ContributionFragmentRegistry should also be migrated in favor of registries using the XRegistry annotation
      • all other contributions (probably not handling hot reload properly) should also be migrated to the new system

      This will allow using an unified behavior for most of contributions inside the platform:

      <contrib id="..." merge="true|false" enable="true|false" remove="true|false">
       // content that can be merged
      </contrib>
      

      As a result of registry usage, the registerExtension and registerContribution methods in component code are not used anymore in migrated components and should issue a deprecation warning if used.

      Extension points that were not previously merging will need to be documented in case the "consistent" behavior is unexpected for migrated projects.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 weeks, 1 day, 2 hours, 30 minutes
                  4w 1d 2h 30m