Skip to main content
Pentaho Documentation

Service

Service

The Service class is an in-memory implementation of the pentaho.config.IService interface.

AMD Module

require(["pentaho/config/impl/Service"], function(Service) { /* code goes here */ });

Extends

Implements

Constructor

Name Description
new Service()
 
Static

Creates a configuration service instance with no registrations.

Members

Name Description
base : function
 
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Methods

Name Description
add(config)

Adds an configuration rule set.

addRule(rule)

Adds a configuration rule.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

getAsync(environment) : Promise.<!pentaho.config.IConfiguration>

Obtains a promise for a configuration that applies to a given platform environment.

Constructor Details

new Service()
 
Static

Creates a configuration service instance with no registrations.

Source: javascript/web/pentaho/config/impl/Service.js, line 140

Members Details

base: function
 
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Can also be called from within a constructor function.

Source: javascript/web/pentaho/lang/Base.js, line 299

Inherited From: pentaho.lang.Base#base

Methods Details

add(config)

Adds an configuration rule set.

Source: javascript/web/pentaho/config/impl/Service.js, line 158

Parameters:
Name Default Value Summary
config : pentaho.config.spec.IRuleSet

A configuration rule set to add.

addRule(rule)

Adds a configuration rule.

The insertion order is used as the fallback rule order. For more information on the specificity of rules, see config.spec.IRuleSet.

Note that the specified rule object may be slightly modified to serve the service's internal needs.

Source: javascript/web/pentaho/config/impl/Service.js, line 178

Parameters:
Name Default Value Summary
rule : pentaho.config.spec.IRule

The configuration rule to add.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

Methods that are overridden are accessible through this.base.

This object is extended, but its class doesn't change.

Source: javascript/web/pentaho/lang/Base.js, line 1037

Inherited From: pentaho.lang.Base#extend

Parameters:
Name Default Value Summary
source : Object

The instance specification.

keyArgs : Object
 
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : Object
 
Optional

A map of property names to exclude from source.

Returns:
Name Description
Object

This object.

Implements:
getAsync(environment) : Promise.<!pentaho.config.IConfiguration>

Obtains a promise for a configuration that applies to a given platform environment.

Source: doc-js/pentaho/config/IService.jsdoc, line 94

Parameters:
Name Default Value Summary
environment : pentaho.environment.IEnvironment
 
Optional

The platform environment that is used to select rules. When unspecified, a "null" environment is used.

A Nully variable value is equivalent to a variable that is not present. It matches only configuration rules that do not select that variable.

When the map is unspecified, every variable will appear as though it had been specified with a null value.

Variable values are matched against each value specified by a rule in its selection variables, using JavaScript's strict equality operator, ===.

Returns:
Name Description
Promise.<!pentaho.config.IConfiguration>

A promise for the configuration.