Skip to main content
Pentaho Documentation

Service

Service

The Service class is the base 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 a configuration rule set.

addRule(rule)

Adds a type configuration rule.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

select(typeId, context) : Object

Obtains the merged configuration specification of the selection of configuration rules that apply to a given type and context variables.

Constructor Details

new Service()
 
Static

Creates a configuration service instance with no registrations.

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

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 265

Inherited From: pentaho.lang.Base#base

Methods Details

Implements:
add(config)

Adds a configuration rule set.

Added configurations overrides previously added configurations, if all other rule-ordering criteria are equal. For more information on the specificity of rules, see config.spec.IRuleSet.

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

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

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

A type configuration to add.

addRule(rule)

Adds a type 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 101

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

The type 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.

Can be applied to non-Base instances (e.g. using Base.prototype.extend.call(alien, {a: "hello"})).

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

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:
select(typeId, context) : Object

Obtains the merged configuration specification of the selection of configuration rules that apply to a given type and context variables.

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

Parameters:
Name Default Value Summary
typeId : string

The id of the type whose configuration specification is desired.

context : pentaho.context.IContext
 
Optional

The platform context that is used to select rules.

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
Object

The merged configuration specification, if any rule was selected; or null, if no rule was selected.