# orion.cm.configadmin

The `orion.cm.configadmin` service, also called ConfigurationAdmin, provides management of configuration information. Internally, the ConfigurationAdmin service is used by the Settings page to manage the values of plugin Settings.

The service methods are:

getConfiguration(pid)
  Returns the Configuration with the given PID from the database. If no such Configuration exists, a new one is created and then returned.
listConfigurations()
  Returns an array of all current Configuration objects from the database.

Refer to `orion.cm.ConfigurationAdmin` in the client API reference for a full description of this service's API methods.

Here is an example of how to use the ConfigurationAdmin service to print out all existing configurations and their property values:

     var configurations = serviceRegistry.getService("orion.cm.configadmin").listConfigurations().then(function(configurations) {
             configurations.forEach(function(configuration) {
                 var properties = configuration.getProperties();
                 var propertyInfo = Object.keys(properties).map(function(propertyName) {
                     if (propertyName !== "pid") {
                         return "\n        " + propertyName + ": " + JSON.stringify(properties[propertyName]) + "\n";
                     }
                 }).join("");
                 console.log("Configuration pid: " + configuration.getPid() + "\n"
                           + "  properties: {" + propertyInfo + "\n"
                           + "  }");
             });
     });

The result might look something like this:

    Configuration pid: nonnls.config
      properties: {
            enabled: false
      }
    Configuration pid: jslint.config
      properties: {
            options: "laxbreak:true, maxerr:50"
      }