07-17-2014 02:01 PM
I want to enable soft-deletes as described at Deleting Documents. I have been able to manually perform the edit to default-repository-config.xml.nxftl
and have confirmed that it works, but now I wish to store this configuration change in our configuration management system to ensure that our servers are automatically deployed with it.
As I see it there are at least two options:
common-base/nxserver/config/default-repository-config.xml.nxftl
file with an edited version of my file when the server configuration is deployed.The second option seems more correct to me, but is there a way to add that one configuration option to the repository configuration that already exists in common-base
from my own configuration template, or must I still copy the contents of that default-repository-config.xml.nxftl
file no matter where I load the repository configuration from?
Thanks for any insight.
08-13-2014 05:45 PM
I ended up doing a variation of Julien Carsique's first suggestion, basically embedding
sed '/<indexing>/i <softDelete enabled=\"true\" />' \
/var/lib/nuxeo/server/templates/common-base/nxserver/config/default-repository-config.xml.nxftl \
> /nuxeo/templates/local/conf/default-repository-config.xml.nxftl
in our deployment script.
As they say, crude but effective.
07-17-2014 09:14 PM
Hello,
The second option is by far the best. Il you need to add things to the default-reposiroty-config.xml.nxftl file, the you have to override it. If you just need to change some configuration values, then you can do it in you nuxeo.conf file or in the nuxeo.default file of your site-specific custom template.
07-18-2014 09:52 AM
So in order to override the default, do I use the same component name/extension target/repository name in my own template, copying over the same attributes from the original and adding my own changes? Or is there a way to only apply my changes, in case default-repository-config.xml.nxftl
changes in a later Nuxeo release in ways that are not relevant to me?
07-18-2014 10:18 AM
Yes, use the same component. You can copy/paste the file in your own template, it will then override the common-base one.
07-21-2014 12:04 PM
Hi,
As said Damien, the first option should be banned. Based on the second option (no change on the original files, use of a custom configuration template), you can:
default-repository-config.xml.nxftl
. You will use the configuration templates system to overwrite the default contribution provided by Nuxeo. The server will only read your file. Keeping it in sync can be done by applying a diff patch to the copy of the original file for every release.default-repository-config.xml.nxftl
, you may be able to write a custom component in a custom-repository-config.xml.nxftl
using the SQLRepositoryService's capabilities of merge and update.About the soft-delete case, I didn't check if it was possible to contribute that option in a standalone XML component, in addition to the default configuration... that would be easier. Else, when a full overwrite of the default contribution is required, only for a few fields, it's worth to suggest an improvement to Nuxeo with a parameterized option easing a service customization.
08-13-2014 05:45 PM
I ended up doing a variation of Julien Carsique's first suggestion, basically embedding
sed '/<indexing>/i <softDelete enabled=\"true\" />' \
/var/lib/nuxeo/server/templates/common-base/nxserver/config/default-repository-config.xml.nxftl \
> /nuxeo/templates/local/conf/default-repository-config.xml.nxftl
in our deployment script.
As they say, crude but effective.
08-14-2014 10:32 AM
FYI for this one I opened [NXP-14961](https
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.