Skip to main content

Pentaho+ documentation is moving!

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

 

Hitachi Vantara Lumada and Pentaho Documentation

IInstanceMeta

pentaho.module. IInstanceMeta

The IInstanceMeta interface contains the metadata of an instance module.

Source: doc-js/pentaho/module/IInstanceMeta.jsdoc, line 17

Extends

Members

Name Description
alias : nonEmptyString

Gets the alias of the module.

config : object

Gets the configuration of the module.

error : Error

Gets the preparation or loading error of the module, if any, or null, otherwise.

getAnnotationsIds

Gets an array of identifiers of the annotations of this module, if any.

hasAnnotation

Determines if this module is annotated with an annotation of a given type.

id : nonEmptyString

Gets the identifier of the module.

import

Imports a module, given its identifier.

isLoaded : boolean

Gets a value that indicates if the module is loaded.

isPrepared : boolean

Gets a value that indicates if the module's configuration and asynchronous annotations have been loaded.

isRejected : boolean

Gets a value that indicates if the module's preparation or loading failed.

isVirtual : boolean

Gets a value that indicates if the module is virtual.

kind : nonEmptyString

Gets the kind of module.

ranking : number

Gets the ranking of the module.

resolveId

Resolves a module identifier as if it were a dependency of this one.

type : pentaho.module.ITypeMeta

Gets the type module of which this one is an instance, or null, if the instance is of an unknown type.

value : *

Gets the value of the module, if it has been loaded already, or undefined, otherwise.

Methods

Name Description
getAnnotation(Annotation, keyArgs) : pentaho.module.Annotation

Gets an annotation associated with this module, given the annotation type or its identifier.

getAnnotationAsync(Annotation, keyArgs) : Promise.<?pentaho.module.Annotation>

Gets an annotation associated with this module, asynchronously, given the annotation type or its identifier.

isInstanceOf(typeIdOrAlias) : boolean

Indicates if this module is an instance module which is a direct or indirect instance of a given type module.

isSubtypeOf(baseIdOrAlias) : boolean

Indicates if this module is a type module which is a subtype of given type module.

loadAsync() : Promise

Loads the module and returns a promise for its value.

prepareAsync() : Promise

Prepares a module for loading.

Members Details

alias: nonEmptyString

Gets the alias of the module.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 49

Inherited From: pentaho.module.IMeta#alias

config: object

Gets the configuration of the module.

When not yet loaded, or if the module has no configuration, returns null.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 112

Inherited From: pentaho.module.IMeta#config

See also: pentaho.module.IMeta#isPrepared , pentaho.module.IMeta#prepareAsync , pentaho.module.IMeta#value

error: Error

Gets the preparation or loading error of the module, if any, or null, otherwise.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 153

Inherited From: pentaho.module.IMeta#error

See also: pentaho.module.IMeta#isRejected , pentaho.module.IMeta#value

getAnnotationsIds:

Gets an array of identifiers of the annotations of this module, if any.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 298

Inherited From: pentaho.module.IMeta#getAnnotationsIds

hasAnnotation:

Determines if this module is annotated with an annotation of a given type.

Note that an annotation of the given type may be associated with this module and, still, not have been loaded yet! You may want to use this method to avoid a call to pentaho.module.IMeta#getAnnotationAsync which would resolve to null.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 278

Overrides: pentaho.module.IMeta#hasAnnotation

id: nonEmptyString

Gets the identifier of the module.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 30

Inherited From: pentaho.module.IMeta#id

import:

Imports a module, given its identifier.

The module identifier is first resolved, by using pentaho.module.IMeta##resolveId.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 224

Inherited From: pentaho.module.IMeta#import

isLoaded: boolean

Gets a value that indicates if the module is loaded.

When a module is loaded, its value, configuration, and even its asynchronous annotations are accessible synchronously.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 180

Inherited From: pentaho.module.IMeta#isLoaded

See also: pentaho.module.IMeta#value

isPrepared: boolean

Gets a value that indicates if the module's configuration and asynchronous annotations have been loaded.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 166

Inherited From: pentaho.module.IMeta#isPrepared

See also: pentaho.module.IMeta#prepareAsync , pentaho.module.IMeta#config , pentaho.module.IMeta#getAnnotation , pentaho.module.IMeta#value

isRejected: boolean

Gets a value that indicates if the module's preparation or loading failed.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 197

Inherited From: pentaho.module.IMeta#isRejected

See also: pentaho.module.IMeta#error , pentaho.module.IMeta#value

isVirtual: boolean

Gets a value that indicates if the module is virtual.

A virtual module does not have a corresponding file or implementation.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 69

Inherited From: pentaho.module.IMeta#isVirtual

kind: nonEmptyString

Gets the kind of module.

One of the strings "type" or "instance".

Source: doc-js/pentaho/module/IMeta.jsdoc, line 39

Inherited From: pentaho.module.IMeta#kind

ranking: number

Gets the ranking of the module.

The ranking determines the order of the module amongst other modules.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 58

Inherited From: pentaho.module.IMeta#ranking

resolveId:

Resolves a module identifier as if it were a dependency of this one.

Resolving makes moduleId absolute, relative to this one.

Afterwards, any applicable RequireJS contextual mapping configuration is applied.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 209

Inherited From: pentaho.module.IMeta#resolveId

See also: pentaho.module.util.resolveModuleId

type: pentaho.module.ITypeMeta

Gets the type module of which this one is an instance, or null, if the instance is of an unknown type.

Source: doc-js/pentaho/module/IInstanceMeta.jsdoc, line 26

value: *

Gets the value of the module, if it has been loaded already, or undefined, otherwise.

If the module failed to prepare or load, its error is thrown.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 128

Inherited From: pentaho.module.IMeta#value

See also: pentaho.module.IMeta#isPrepared , pentaho.module.IMeta#isLoaded , pentaho.module.IMeta#isRejected , pentaho.module.IMeta#config , pentaho.module.IMeta#error , pentaho.module.IMeta#getAnnotation , pentaho.module.IMeta#prepareAsync , pentaho.module.IMeta#loadAsync

Methods Details

getAnnotation(Annotation, keyArgs) : pentaho.module.Annotation

Gets an annotation associated with this module, given the annotation type or its identifier.

Either this module is annotated with the requested annotation, or, optionally, if this is a type module and keyArgs.inherit is true, one of its ancestors is.

If no annotation exists (or is inherited), or exists but is not available synchronously, null is returned, unless keyArgs.assertResult is true, in which case an error is thrown instead.

If this module has already been prepared, then all of its annotations (even if inherited) are available synchronously. From within the code of a module which uses the pentaho/module!_ AMD loader plugin, it is always safe to get any annotation which is known to have been associated with it.

If it is not known whether an annotation can be obtained synchronously, the pentaho.module.IMeta#getAnnotationAsync method should be used instead.

When this method returns an annotation, for a given annotation type, it always returns the same annotation instance.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 237

Inherited From: pentaho.module.IMeta#getAnnotation

Parameters:
Name Default Value Summary
Annotation : Class.<pentaho.module.Annotation> | string

The constructor of the annotation or the annotation identifier.

keyArgs : object
Optional

The keyword arguments object.

Parameters:
Name Default Value Summary
inherit : boolean
Optional
false

Indicates that if an annotation of the specified type is not present in this module and this is a type module, an annotation of the specified type may be returned from the closest ancestor module which has one.

assertResult : boolean
Optional
false

Indicates that an error should be thrown if an annotation does not exist or, otherwise, cannot be returned synchronously.

Returns:
Name Description
pentaho.module.Annotation | null

The requested annotation, if one is associated with this module; null, otherwise.

getAnnotationAsync(Annotation, keyArgs) : Promise.<?pentaho.module.Annotation>

Gets an annotation associated with this module, asynchronously, given the annotation type or its identifier.

Either this module is annotated with the requested annotation, or, optionally, if this is a type module and keyArgs.inherit is true, one of its ancestors is.

If no annotation exists (or is inherited), a settled promise with the value null is returned, unless keyArgs.assertResult is true, in which case a rejected promise is returned instead.

When this method returns a settled promise, with an annotation, for a given annotation type, it always returns the same annotation instance.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 310

Inherited From: pentaho.module.IMeta#getAnnotationAsync

Parameters:
Name Default Value Summary
Annotation : Class.<pentaho.module.Annotation> | string

The constructor of the annotation or the annotation identifier.

keyArgs : object
Optional

The keyword arguments object.

Parameters:
Name Default Value Summary
inherit : boolean
Optional
false

Indicates that if an annotation of the specified type is not present in this module and this is a type module, an annotation of the specified type may be returned from the closest ancestor module which has one.

assertResult : boolean
Optional
false

Indicates that the promise should be rejected with an error if the module (and, optionally, any of its ancestors) is not annotated with an annotation of the requested type.

Returns:
Name Description
Promise.<?pentaho.module.Annotation>

A promise that resolves to the requested annotation, if one is associated with this module, or to null, otherwise.

isInstanceOf(typeIdOrAlias) : boolean

Indicates if this module is an instance module which is a direct or indirect instance of a given type module.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 364

Inherited From: pentaho.module.IMeta#isInstanceOf

Parameters:
Name Default Value Summary
typeIdOrAlias : string | pentaho.module.IMeta

The identifier or alias or instance of a type module.

Returns:
Name Description
boolean

true if this module is an instance module which is an instance of the given type module; false, otherwise.

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When the typeIdOrAlias module is defined but is not a type module.

isSubtypeOf(baseIdOrAlias) : boolean

Indicates if this module is a type module which is a subtype of given type module.

A module is a subtype of another if both are type modules and they're the same module or the base module can be found by walking up through its ancestor property.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 345

Inherited From: pentaho.module.IMeta#isSubtypeOf

Parameters:
Name Default Value Summary
baseIdOrAlias : string | pentaho.module.IMeta

The identifier or alias or instance of the base module.

Returns:
Name Description
boolean

true if both modules are type modules and this module is a subtype of the given base module; false, otherwise.

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When the baseIdOrAlias module is defined but is not a type module.

loadAsync() : Promise

Loads the module and returns a promise for its value.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 101

Inherited From: pentaho.module.IMeta#loadAsync

Returns:
Name Description
Promise

A promise for the value of the module.

See also: pentaho.module.IMeta#value

prepareAsync() : Promise

Prepares a module for loading.

The preparation of a module consists of: i) loading its configuration, and ii) loading asynchronous annotations associated with it.

Loading a module, through loadAsync, also prepares it.

Source: doc-js/pentaho/module/IMeta.jsdoc, line 80

Inherited From: pentaho.module.IMeta#prepareAsync

Returns:
Name Description
Promise

A promise for the completion of the module's preparation.

See also: pentaho.module.IMeta#isPrepared , pentaho.module.IMeta#config , pentaho.module.IMeta#getAnnotation , pentaho.module.IMeta#value