Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

config

pentaho. config

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

Overview

The Configuration API provides a means for modules to be configured by third-parties.

Modules are known by their string identifier.

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

require.config({
  config: {
    "pentaho/modules": {
      "my/rules": {type: "pentaho/config/spec/IRuleSet"}
    }
  }
});

Configuration rules specify the module identifier 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 pentaho.config.IService interface, the main instance of which is pentaho.config.service. Example:

define([
  "pentaho/config/service"
], function(configService) {

  // Get the configuration for the module my/IFoo: configService.selectAsync("my/IFoo").then(function(config) { if(config !== null) { // ... } }); }); 

More commonly, a module requests its own configuration using the pentaho/module! AMD/RequireJS loader plugin.

For example, the my/Foo module could obtain its own configuration in the following way:

define(["pentaho/module!_"], function(module) {

  if(module.config !== null) {
    // ...
  }
});

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
IService

The config.IService interface describes a service that manages configurations of modules, and of module annotations, for a given environment.