Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Util

pentaho.type. Util

A singleton class that contains utilities for using types and its instances.

AMD Module

require(["pentaho/type/util"], function(Util) { /* code goes here */ });

Constructor

Name Description
new Util()

This class was not designed to be constructed directly.

Methods

Name Description
combineErrors(errors, errorsAdd) : Array.<<code>pentaho.type.ValidationError>

Combines two validation error lists.

fillSpecMethodInContext(spec, obj, name) : boolean

Fills the given specification with the specification of a method attribute of a given object, and returns whether it was actually added.

normalizeErrors(errors) : Array.<<code>pentaho.type.ValidationError>

Normalizes a validation errors result.

Constructor Details

new Util()

This class was not designed to be constructed directly.

Source: javascript/web/pentaho/type/util.js, line 23

Methods Details

combineErrors(errors, errorsAdd) : Array.<<code>pentaho.type.ValidationError>

Combines two validation error lists.

Source: javascript/web/pentaho/type/util.js, line 81

Parameters:
Name Default Value Summary
errors : Nully | Array.<<code>pentaho.type.ValidationError>

An errors array, if any.

errorsAdd : Nully | pentaho.type.ValidationError | Array.<<code>pentaho.type.ValidationError>

The error or errors to add, if any.

Returns:
Name Description
Array.<<code>pentaho.type.ValidationError>

A combined errors array, or null.

fillSpecMethodInContext(spec, obj, name) : boolean

Fills the given specification with the specification of a method attribute of a given object, and returns whether it was actually added.

This method requires that there currently exists an ambient specification context.

Source: javascript/web/pentaho/type/util.js, line 107

Parameters:
Name Default Value Summary
spec : Object

The specification to be filled.

obj : Object

The object where the method is defined.

name : string

The name of the method.

Returns:
Name Description
boolean

true if the attribute was added, false, otherwise.

normalizeErrors(errors) : Array.<<code>pentaho.type.ValidationError>

Normalizes a validation errors result.

Source: javascript/web/pentaho/type/util.js, line 69

Parameters:
Name Default Value Summary
errors : Nully | pentaho.type.ValidationError | Array.<<code>pentaho.type.ValidationError>

An error, an errors array, or a Nully value.

Returns:
Name Description
Array.<<code>pentaho.type.ValidationError>

An array of validation errors or null.