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

Annotation

pentaho.module Annotation

Annotations can be associated with modules to extend their configuration space for use by related third-parties.

One annotation of each type can be associated with a module in one of two ways:

  1. When declaring a module, by using the annotations property, to associate any number of annotations, unconditionally.
  2. When configuring a module, by using the annotation property, a new annotation can be associated with a module or an existing annotation can be configured. This can be done conditionally, depending on the current environment.

By convention, the name of annotation classes ends with Annotation. However, this suffix must not be used when associating an annotation with a module, through either of the above methods - the annotation type's shortId must be used.

When a module is prepared, all of its annotations are created (if not already created).

Annotations are allowed to depend on other annotations. When being created, through Annotation.createAsync, other annotations can be obtained using IMeta#getAnnotationAsync, as long as no cycles arise.

Annotations are immutable.

See also: pentaho.module.IMeta#hasAnnotation , pentaho.module.IMeta#getAnnotationsIds , pentaho.module.IMeta#getAnnotation , pentaho.module.IMeta#getAnnotationAsync

Constructor

Name Description
new Annotation(forModule)
Abstract

Creates an annotation associated with a given module.

Members

Name Description
id : string
Static

Gets the type of annotation.

forModule : pentaho.module.IMeta

Gets the annotated module.

Methods

Name Description
createAsync(forModule, annotSpec) : Promise.<pentaho.module.Annotation>
Static

Creates an annotation, given the annotated module and the annotation specification.

toFullId(annotationId) : string
Static

Rewrites an annotation identifier so that it surely has the Annotation suffix.

Constructor Details

new Annotation(forModule)
Abstract

Creates an annotation associated with a given module.

Source: javascript/web/pentaho/module/Annotation.js, line 69

Parameters:
Name Default Value Summary
forModule : pentaho.module.IMeta

The annotated module.

See also: pentaho.module.IMeta#hasAnnotation , pentaho.module.IMeta#getAnnotationsIds , pentaho.module.IMeta#getAnnotation , pentaho.module.IMeta#getAnnotationAsync

Members Details

id: string
Static

Gets the type of annotation.

Source: javascript/web/pentaho/module/Annotation.js, line 93

forModule: pentaho.module.IMeta

Gets the annotated module.

Source: javascript/web/pentaho/module/Annotation.js, line 83

Methods Details

createAsync(forModule, annotSpec) : Promise.<pentaho.module.Annotation>
Static

Creates an annotation, given the annotated module and the annotation specification.

Source: javascript/web/pentaho/module/Annotation.js, line 114

Parameters:
Name Default Value Summary
forModule : pentaho.module.IMeta

The annotated module.

annotSpec : object

The annotation specification.

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

A promise that resolves to the created annotation.

toFullId(annotationId) : string
Static

Rewrites an annotation identifier so that it surely has the Annotation suffix.

Source: javascript/web/pentaho/module/Annotation.js, line 103

Parameters:
Name Default Value Summary
annotationId : string

The annotation type identifier.

Returns:
Name Description
string

The rewritten annotation type identifier.