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

ILoader

pentaho.type. ILoader

The ILoader interface describes a type and instance loader of the Type API.

Source: doc-js/pentaho/type/ILoader.jsdoc, line 17

Methods

Name Description
resolveInstance(instSpec, instKeyArgs, baseType) : pentaho.type.Instance

Resolves an instance specification.

resolveInstanceAsync(instSpec, instKeyArgs, baseType) : Promise.<pentaho.type.Instance>

Resolves an instance reference, asynchronously.

resolveType(typeRef, keyArgs) : Class.<pentaho.type.Instance>

Resolves a type reference and returns its instance constructor.

resolveTypeAsync(typeRef, keyArgs) : Promise.<Class.<pentaho.type.Instance>>

Resolves a type reference, asynchronously, and returns a promise that resolves to the type's instance constructor.

Methods Details

resolveInstance(instSpec, instKeyArgs, baseType) : pentaho.type.Instance

Resolves an instance specification.

This method can be used for creating a new instance, given an instance specification.

Source: doc-js/pentaho/type/ILoader.jsdoc, line 130

Parameters:
Name Default Value Summary
instSpec : pentaho.type.Instance | pentaho.type.spec.Instance
Optional

An instance specification or an instance.

instKeyArgs : object
Optional

The keyword arguments passed to the instance constructor, when one is created.

baseType : pentaho.type.Type
Optional

The base type of which returned instances must be an instance and, also, the default type used when type information is not available in instRef.

Returns:
Name Description
pentaho.type.Instance

An instance.

Throws:
Name Description
pentaho.lang.OperationInvalidError

When it is not possible to determine the type of instance to create based on instRef and baseType is not specified.

pentaho.lang.OperationInvalidError

When an instance should be created but its determined type is abstract.

Error

Other errors, as documented in resolveType.

See also: pentaho.type.ILoader#resolveInstanceAsync , pentaho.type.Type#create

resolveInstanceAsync(instSpec, instKeyArgs, baseType) : Promise.<pentaho.type.Instance>

Resolves an instance reference, asynchronously.

This method can be used for creating a new instance, given an instance specification.

Source: doc-js/pentaho/type/ILoader.jsdoc, line 160

Parameters:
Name Default Value Summary
instSpec : pentaho.type.Instance | pentaho.type.spec.Instance
Optional

An instance specification or an instance.

instKeyArgs : object
Optional

The keyword arguments passed to the instance constructor, when one is created.

baseType : pentaho.type.Type
Optional

The base type of which returned instances must be an instance and, also, the default type used when type information is not available in instRef.

Returns:
Name Description
Promise.<pentaho.type.Instance>

A promise to an instance.

See also: pentaho.type.ILoader#resolveInstance , pentaho.type.Type#createAsync

resolveType(typeRef, keyArgs) : Class.<pentaho.type.Instance>

Resolves a type reference and returns its instance constructor.

For more information on the typeRef argument, see TypeReference.

If it is not known whether all types that are referenced by identifier within typeRef have already been loaded, the asynchronous method version, resolveTypeAsync, should be used instead.

Source: doc-js/pentaho/type/ILoader.jsdoc, line 26

Parameters:
Name Default Value Summary
typeRef : pentaho.type.spec.TypeReference

A type reference.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
defaultBase : pentaho.type.spec.TypeReference
Optional

The default base type of typeRef when it is an immediate generic object specification.

Returns:
Name Description
Class.<pentaho.type.Instance>

The instance constructor.

Throws:
Name Description
pentaho.lang.ArgumentRequiredError

When typeRef is an empty string or Nully.

pentaho.lang.ArgumentInvalidError

When typeRef is of an unsupported JavaScript type: not a string, function, array or object.

pentaho.lang.ArgumentInvalidError

When typeRef is a type constructor (e.g. Type)

pentaho.lang.ArgumentInvalidError

When typeRef is an instance of pentaho.type.Instance.

Error

When the identifier of a type is not defined as a module in the AMD module system (specified directly in typeRef, or present in an generic type specification).

Error

When an identifier is of a module that the AMD module system has not loaded yet (specified directly in typeRef, or present in an generic type specification).

pentaho.lang.ArgumentInvalidError

When typeRef is, or contains, an array-shorthand, list type specification that has more than one child element type specification.

pentaho.lang.ArgumentInvalidError

When typeRef is, or contains, a generic object type specification that has a permanent identifier.

pentaho.lang.ArgumentInvalidError

When typeRef is, or contains, a generic object type specification that has a temporary identifier which is already defined.

See also: pentaho.type.ILoader#resolveTypeAsync

resolveTypeAsync(typeRef, keyArgs) : Promise.<Class.<pentaho.type.Instance>>

Resolves a type reference, asynchronously, and returns a promise that resolves to the type's instance constructor.

For more information on the typeRef argument, see TypeReference.

This method can be used even if a generic type specification references types whose modules have not yet been loaded by the AMD module system.

Source: doc-js/pentaho/type/ILoader.jsdoc, line 76

Parameters:
Name Default Value Summary
typeRef : pentaho.type.spec.TypeReference

A type reference.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
defaultBase : pentaho.type.spec.TypeReference
Optional

The default base type of typeRef when it is an immediate generic object specification.

Returns:
Name Description
Promise.<Class.<pentaho.type.Instance>>

A promise for the instance constructor.

See also: pentaho.type.ILoader#resolveType