Platform Explorer / Nuxeo Platform LTS 2019 10.10

Component org.nuxeo.ecm.core.schema.ObjectResolverService

Documentation

This components allows to extend XSD field definition by providing a way to resolve simple type as external entity references.

Resolution Order

150
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

859
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Services

Extension Points

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.ecm.core.schema.ObjectResolverService" version="1.0.0">
  <documentation>
    This components allows to extend XSD field definition by providing a way to resolve simple type as
    external entity references.
  </documentation>

  <service>
    <provide interface="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverService" />
  </service>

  <implementation class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverServiceImpl" />

  <extension-point name="resolvers">

    <documentation>
      Extension Point to register an external entity resolver. You must provide an XSD type derived from xs:string and
      registered under namespace http://www.nuxeo.org/ecm/schemas/core/external-references/. The resolver class must
      implement org.nuxeo.ecm.core.schema.types.resolver.ObjectResolver.
      Example :
      <resolver type="productReference" class="org.mycompany.product.ProductNuxeoResolver" />

      By default, a constraint is added to documents about to be saved in order to validate if the property reference
      an existing external entity. You can disable this validation by setting attribute validation to false, for instance:
      <code xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/">
        <xs:element name="lastContributor">
          <xs:simpleType>
            <xs:restriction base="xs:string" ref:resolver="userManagerResolver" ref:type="user" ref:validation="false" />
          </xs:simpleType>
        </xs:element>
      </code>
    </documentation>

    <object class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverDescriptor" />

  </extension-point>

</component>