Skip to main content
Pentaho Documentation

config

pentaho.config

The config namespace contains the types of the Pentaho Configuration API.

Overview

The Configuration API provides a means for types and instances to be configured by third-parties.

Types and instances are known by their string identifier and are, for all other purposes, opaque entities — types may or may not exist as actual classes; these may simply represent an interface type.

Configurations are JavaScript objects that conform to the IRuleSet interface — essentially, a set of configuration rules, IRule. Typically, configurations are provided as the value returned by an AMD/RequireJS module. This module needs to be advertised to the configuration system by registering it with pentaho/instanceInfo, as an instance of type pentaho.config.spec.IRuleSet.

Configuration rules specify the type or instance and the values of any platform environmental variables to which they apply, as well as the actual configuration properties that should be applied.

Configurations can be obtained through the config.IService interface.

The platform's main configuration service instance can be obtained by getting the service of id pentaho.config.IService, i.e., by requiring the AMD/RequireJS module pentaho/service!pentaho.config.IService?single. Example:

require([
  "pentaho/service!pentaho.config.IService?single",
  "pentaho/environment"
], function(configService, mainEnvironment) {

  // Get the configuration for 'my.IFoo' components,
  // under the main platform environment:
  configService.getAsync(mainEnvironment).then(function(config) {
    var myConfig = config.selectType("my.IFoo");
    if(myConfig) {
      // ...
    }
  });
});

Source: doc-js/pentaho/config/_namespace.jsdoc, line 17

Child Namespaces

Name Summary
spec

The specifications sub-namespace of the pentaho.config namespace.

Interfaces

Name Summary
IConfiguration

The config.IConfiguration interface describes an object that contains configurations of types and instances.

IService

The config.IService interface describes a service that manages configurations, usually of types.