A simple example showcasing the ConfigAdmin capabilities with a Localstorage
Persistence Manager implementation.
Run npx serve dist
in this folder to start a web server
Server will start at: http://localhost:3000
The Configuration Management Bundle is installed as soon as it can resolve it's dependencies.
The CM Service will find the ManagedServiceTest
Service registration when it starts, and if the CM Service can find
a corresponding PID stored in the Localstorage, then it will call ManagedServiceTest
's updated()
method.
3 seconds later another Bundle will be installed: config-admin-manager.js
. This Bundle in it's own activator will
update the PID's configuration (test.pid
) regardless of any pre-defined value.
Every change triggering the
updated()
method ofManagedServiceTest
will trigger a log message.
Any Bundle which wants to register a ManagedService Must require:
{
"Require-Capability": "@pandino/pandino-configuration-management;filter:=(objectClass=\"@pandino/pandino-configuration-management/ManagedService\")"
}