Platform Explorer / Nuxeo Platform LTS 2019 10.10

Contribution org.nuxeo.ecm.platform.url.service.DocumentViewCodecService.contrib--codecs

This contribution is part of XML component org.nuxeo.ecm.platform.url.service.DocumentViewCodecService.contrib inside nuxeo-platform-url-core-10.10.jar /OSGI-INF/docviewurlservice-contrib.xml

Documentation

The docid codec uses the document uid to resolve the context. Urls are of the form http://site/nuxeo/nxdoc/demo/docuid/view.

The docpath codec uses the document path to resolve the context. Urls are of the form http://site/nuxeo/nxpath/demo/path/to/my/doc@view.

The document file codec uses the document uid to resolve the document model and extract a file held in its properties. Urls are of the form http://site/nuxeo/nxfile/demo/docuid/file:content/mydoc.odt.

We declare three codecs using this same class but different prefixes (nxfile, nxeditfile,...) so that we can define several url patterns, performing different actions, but still using the same syntax.

Extension Point

Extension point codecs of component DocumentViewCodecService.

Registration Order

4
The registration order represents the order in which this contribution was registered on its target extention point. This will impact the override/merge behaviour when it is implemented on the target service, and is useful for proper customization of existing contributions.
You can influence this order by adding "require" tags in the containing component declaration, to make sure it is resolved after another component (see "Resolution Order" on components).

Contributed Items

  • <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentIdCodec" default="true" enabled="true" name="docid" prefix="nxdoc"/>
  • <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentPathCodec" default="false" enabled="true" name="docpath" prefix="nxpath"/>
  • <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentFileCodec" enabled="true" name="editFile" prefix="nxeditfile"/>
  • <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentFileCodec" enabled="true" name="pdfFile" prefix="nxpdffile"/>

XML Source

<extension point="codecs" target="org.nuxeo.ecm.platform.url.service.DocumentViewCodecService">
    <documentation>
      The docid codec uses the document uid to resolve the context. Urls are of
      the form http://site/nuxeo/nxdoc/demo/docuid/view.

      The docpath codec uses the document path to resolve the context. Urls are
      of the form http://site/nuxeo/nxpath/demo/path/to/my/doc@view.

      The document file codec uses the document uid to resolve the document
      model and extract a file held in its properties. Urls are of the form
      http://site/nuxeo/nxfile/demo/docuid/file:content/mydoc.odt.

      We declare three codecs using this same class but different prefixes
      (nxfile, nxeditfile,...) so that we can define several url patterns,
      performing different actions, but still using the same syntax.
    </documentation>
    <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentIdCodec" default="true" enabled="true" name="docid" prefix="nxdoc"/>
    <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentPathCodec" default="false" enabled="true" name="docpath" prefix="nxpath"/>
    <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentFileCodec" enabled="true" name="editFile" prefix="nxeditfile"/>
    <documentViewCodec class="org.nuxeo.ecm.platform.url.codec.DocumentFileCodec" enabled="true" name="pdfFile" prefix="nxpdffile"/>
  </extension>