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

introduce content factory selector feature in content template manager

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Postponed
    • Component/s: Core

      Description

      Content template factories are automatically selected gving a document type or a facet. This is hard-coded inside the content template service. We need to be able to select dedicated content factories giving a document property value.

      We're going to introduce a new extension, configuring the service for selecting a content factory as needed. We named that extension "selector".
      Selectors will be ordered giving their name. The first selector returning a content factory will gain the rights for providing contents.

      Here is the configuration that is backward compatible with oldest version of the service :

      <extension
      target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService"
      point="factorySelector">

      <factorySelector name="10-type" class="org.nuxeo.ecm.platform.content.template.selectors.TypeSelector"/>
      <factorySelector name="20-facet" class="org.nuxeo.ecm.platform.content.template.selectors.FacetSelector"/>

      </extension>

      A selector should implement the interface

      public interface FactorySelector

      { String getKeyFor(DocumentModel doc); String getKeyFor(ContentFactoryDescriptor desc, FactoryBindingDescriptor binding); ContentFactory getFactoryFor(DocumentModel doc); String register(ContentFactoryDescriptor desc, FactoryBindingDescriptor binding, ContentFactory factory); }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: