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:
- When declaring a module, by using the
annotations
property, to associate any number of annotations, unconditionally. - 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 |
Constructor Details
new Annotation(forModule) Abstract | ||||||
---|---|---|---|---|---|---|
Creates an annotation associated with a given module. Source: javascript/web/pentaho/module/Annotation.js, line 69
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
|
toFullId(annotationId) : string Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Rewrites an annotation identifier so that it surely has the Source: javascript/web/pentaho/module/Annotation.js, line 103
|