08-28-2013 01:57 PM
I know according to the Customization documentation:
http://doc.nuxeo.com/display/NXDOC55/Customization+and+Development
When you are not creating a real Nuxeo Plugin (i.e. a JAR), XML configuration files should:
- be copied in the "config" directory (nuxeo.ear/config or nxserver/config),
- have a filename ending with -config.xml,
- have a unique component identifier.
But I was wondering if I would need two seperate whatever*-config.xml files to extend two different components,
e.g. ContentViewService ( org.nuxeo.ecm.platform.ui.web.ContentViewService )
and
WebLayoutManager ( org.nuxeo.ecm.platform.forms.layout.WebLayoutManager )
with the following format ( simplified ) *if anyone knows how to get the code to display properly, please feel free to edit this... *:
> < ?xml version="1.0"? >
>
> < component
> name="com.my.creation.contentView.contrib" >
>
> < require
> >org.nuxeo.ecm.platform.forms.layouts.webapp.listing<
> /require >
>
> < extension
> target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
> point="layouts" >
>
> < layout name="document_listing" >
>
> < templates >
>
> ...
>
> < /templates >
>
> < /layout >
>
> < /extension >
>
> < extension
> target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
> point="widgets" >
>
> < layout name="document_virtual_navigation_listing_ajax"
> >
>
> < templates >
>
> ...
>
> < /templates >
>
> < /layout >
>
> < /extension >
>
> < extension
> target="org.nuxeo.ecm.platform.ui.web.ContentViewService"
> point="contentViews" >
> < contentView name="faceted_search_default" >
>
> ...
> < /contentView >
>
> < /extension > < /component >
I know by default, XML files contributed in the "config" directory are loaded only when the server starts, and that I would need to restart the server to see the changes, but could changes be made to both extensions within the one contribution file?
Thanks in advance!
08-28-2013 02:09 PM
hello,
the answer is yes: you can contribute to as many extension points as you want in a single -config.xml (or -bundle.xml) file deployed in $NUXEO/nxserver/config/
that's the case for the file defining LDAP servers and directories: http://doc.nuxeo.com/download/attachments/5570895/default-ldap-users-directory-bundle.xml
Thierry
08-28-2013 02:09 PM
hello,
the answer is yes: you can contribute to as many extension points as you want in a single -config.xml (or -bundle.xml) file deployed in $NUXEO/nxserver/config/
that's the case for the file defining LDAP servers and directories: http://doc.nuxeo.com/download/attachments/5570895/default-ldap-users-directory-bundle.xml
Thierry
08-28-2013 02:20 PM
Thank you! Would it need to be a -bundle.xml if it were part of a JAR file?
08-28-2013 02:21 PM
in a JAR file, you can name your file as you want, you just need to reference it in your MANIFEST.MF
08-28-2013 03:38 PM
So then what is the difference between using a -bundle.xml extension, and a -config.xml ? Does nuxeo handle them differently?
08-29-2013 02:20 PM
There is no difference. This is historical, we used to put in -bundles.xml files things having to do with the service definitions, and in -config.xml files things that we contributions to service. This separation is not really needed.
08-30-2013 02:51 PM
Thank you for the clarification. In English, you would say "... and in -config.xml files things that are contributions to a service." or "... things we contribute to a service."
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.