Platform Explorer / Nuxeo Platform 2023.11

Extension point processors


The processors extension point allows to define what processors should apply to resources. Some builtin processors apply to all resources, implicitly, this is the case for all processors coming with wro4j.

Other processors require the resource to reference them explicitly in the resource definition (like the "flavor" Nuxeo-specific processor).


    <processor name="myProc" order="10" type="wroPost">

The processor type is a marker that allows to group and order processors for a given usage (here, as a wro4j post processor).

Multiple types are also supported:

    <processor name="myProc" order="10">

The processor class usually needs to follow a given interface depending on its type, but this check is only done at runtime. For instance, processors with the "wroPre" type have to extend ro.isdc.wro.model.resource.processor.ResourcePreProcessor and processors with the "wroPost" type have to extend ro.isdc.wro.model.resource.processor.ResourcePostProcessor.

Builtin wro processors can also be registered without mentioning a class, using their wro alias:

    <processor name="cssMin" order="30" type="wroPre"/>

Some default processors (like cssMin above) are already registered by default in Nuxeo.

Contribution Descriptors

  • Class: org.nuxeo.ecm.web.resources.core.ProcessorDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-web-resources-wro-2023.11.13.jar /OSGI-INF/webresources-contrib.xml
    <extension point="processors" target="org.nuxeo.ecm.platform.WebResources">
        <processor name="nuxeoCssUrlRewriting" order="10" type="wroPre">
        <processor name="cssMinJawr" order="30" type="wroPre"/>
        <processor name="jsMin" order="10" type="wroPost">
        <processor name="flavor" type="wroPre">
        <processor name="sassCss" type="wroPre">