RefinementFacet
pentaho.type.facets.RefinementFacet
A refinement facet provides a refinement type with attributes which, when specified, refine the representation type in some way.
Refinement facets are mixed into a pentaho.type.Refinement
type, by specifying its pentaho.type.Refinement.Type#facets
property, when defining it, either through pentaho.type.Value.refine
or, directly through pentaho.type.Refinement.extend
.
In addition to any attributes that you may define in this type's prototype, to enable configuring an actual refinement, you must implement the static pentaho.type.facets.RefinementFacet.validate
method that will perform the actual validation of instances of the representation class. Note that this method is invoked on the mixed into refinement type, an instance of pentaho.type.Refinement.Type
.
AMD Module
require(["pentaho/type/facets/Refinement"], function(RefinementFacet) { /* code goes here */ });
See also: pentaho.type.Refinement , pentaho.type.Refinement.Type#facets
Constructor
Name | Description |
---|---|
new RefinementFacet() Abstract | The constructor is not used, as the class is to be used as a mixin. |
Members
Name | Description |
---|---|
id : Static | Gets the identifier of the refinement facet AMD module. |
shortId : Static | Gets the short identifier of the refinement facet. |
Methods
Name | Description |
---|---|
fillSpecInContext(spec, keyArgs) : boolean Static | Fills the given specification with the local values of the attributes that this refinement facet adds to a refinement type and returns whether any attribute was actually added. |
validate(value) : pentaho.type.ValidationError | Array.< | null Static | Performs validation of a given value of the representation type. |
Constructor Details
new RefinementFacet() Abstract |
---|
The constructor is not used, as the class is to be used as a mixin. Source: javascript/web/pentaho/type/facets/Refinement.js, line 26 See also: pentaho.type.Refinement , pentaho.type.Refinement.Type#facets |
Members Details
id: Static |
---|
Gets the identifier of the refinement facet AMD module. Source: javascript/web/pentaho/type/facets/Refinement.js, line 68 |
shortId: Static |
---|
Gets the short identifier of the refinement facet. When a refinement facet is one of the standard facets and, thus, it is a direct sub-module of the Otherwise, the short identifier is equal to the identifier. Source: javascript/web/pentaho/type/facets/Refinement.js, line 84 See also: pentaho.type.facets.RefinementFacet.id |
Methods Details
fillSpecInContext(spec, keyArgs) : boolean Static | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fills the given specification with the local values of the attributes that this refinement facet adds to a refinement type and returns whether any attribute was actually added. This method requires that there currently exists an This method is invoked on the refinement type, an instance of Source: javascript/web/pentaho/type/facets/Refinement.js, line 124
|
validate(value) : pentaho.type.ValidationError | Array.< | null Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Performs validation of a given value of the representation type. This method is invoked on the refinement type, an instance of The default implementation throws an error. Source: javascript/web/pentaho/type/facets/Refinement.js, line 103
|