Hi everyone,
I’d like to propose the creation of a new contrib extension, named “System Properties updater”.
Now … I’m not too sure about its naming, so don’t hesitate to propose something on your end.
The goal of this extension is to allow :
- the update of arbitrary XWiki object properties from system properties
- the update of arbitrary XWiki attachments from system properties
By “system properties”, I’m referring to the Java system properties as (System Properties (The Java™ Tutorials > Essential Java Classes > The Platform Environment))
The use-case of this extension is to allow anyone to update XWiki configuration from command line arguments passed to the JVM. One could for example update a color of the current color theme through command-line arguments. In order to identify which object property or which attachment to update, the extension would rely on the serialized form of object property references or attachment references, as such :
property:xwiki:FlamingoThemes.Iceberg^FlamingoThemesCode.ThemeClass.link-color=green
→ This would update the propertylink-color
of the Iceberg theme togreen
attachment:xwiki:FlamingoThemes.Iceberg@logo.svg=http://localhost:9000/logo2.svg
→ This would update the attachmentlogo.svg
of theIceberg
tohttp://localhost:9000/logo2.svg
The goal of this extension is not to provide “pretty” system properties that could be passed to XWiki. The main interest here is to provide fast deployments, where settings in XWiki can be defined by an administrator in advance.
This extension is already developed under LGPL, as part of a project that XWiki SAS is doing with the German Ministry of the Interior. In the case of this project, XWiki is deployed as part of a kubernetes cluster, and having this extension allows defining a couple of properties automatically from the Helm charts used for the deployment, instead of going in the wiki administration.
The current version of this extension can be found here : Files · master · XWiki SAS / openDesk / XWiki · GitLab