Skip to content

Latest commit

 

History

History
 
 

configuration-manager-browser-js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Configuration Manager Browser JS

A simple example showcasing the ConfigAdmin capabilities with a Localstorage Persistence Manager implementation.

Running the example

Run npx serve dist in this folder to start a web server

Server will start at: http://localhost:3000

Configuration mutation

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 of ManagedServiceTest will trigger a log message.

Bundle Requirements

Any Bundle which wants to register a ManagedService Must require:

{
  "Require-Capability": "@pandino/pandino-configuration-management;filter:=(objectClass=\"@pandino/pandino-configuration-management/ManagedService\")"
}