PropertyType
pentaho.type. PropertyType
The type of a property of a complex type.
A property type only exists within a complex type.
See also: pentaho.type.Complex
Extends
Implements
Constructor
Name | Description |
---|---|
new PropertyType() Abstract | Creates a property type object. |
Members
Name | Description |
---|---|
_isLabelSet : boolean Protected | Gets a value that indicates if the label is locally set. |
alias : nonEmptyString | Gets the alias for the identifier of this type. |
ancestor : pentaho.type.Type | Gets the parent type in the current type hierarchy, if any, or |
application : object | Gets or sets the |
category : nonEmptyString | Gets or sets the category associated with this type. |
countMax : undefined | number | pentaho.type.spec.PropertyDynamicAttribute.<number> | Gets or sets the maximum number of elements that properties of this type can have. |
countMin : undefined | number | pentaho.type.spec.PropertyDynamicAttribute.<number> | Gets or sets the minimum number of elements that properties of this type must have. |
declaringType : pentaho.type.ComplexType | Gets the complex type that declares this property type. |
defaultValue : pentaho.type.Value | pentaho.type.spec.PropertyDynamicAttribute.<?pentaho.type.spec.Value> | Gets or sets the default value of properties of this type. |
description : nonEmptyString | Gets or sets the description of this type. |
domain : undefined | Array.<pentaho.type.Element> | pentaho.type.spec.PropertyDynamicAttribute.<Array.<pentaho.type.Element>> | Gets or sets the list of valid values (or a function that evaluates to these) of properties of this type. |
domainOn | Evaluates the value of the |
elementType : pentaho.type.Type | Gets the element type of this type. |
elemName : string | Gets the singular name of |
hasDescendants : boolean | Gets a value that indicates if this type has any descendant types. |
helpUrl : nonEmptyString | Gets or sets a URL pointing to documentation associated with this type. |
id : nonEmptyString | Gets the identifier of this type. |
index : number | Gets the index of the property in the containing complex type. |
instance : pentaho.type.Instance | Gets the prototype of the instances of this type. |
isAbstract : boolean | Gets a value that indicates if this type is abstract. |
isAdvanced : boolean | Gets or sets the |
isApplicable : undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> | Gets or sets a value or function that indicates if properties of this type are applicable. |
isBoundary : boolean | Gets or sets whether the property is a boundary property. |
isBrowsable : boolean | Gets or sets the |
isComplex : boolean | |
isContainer : boolean | Gets a value that indicates if this type |
isContinuous : boolean | Gets a value that indicates if this is a continuous type. |
isElement : boolean | Gets a value that indicates if this type |
isEnabled : undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> | Gets or sets a value, or function, that indicates if properties of this type can be changed by a user, in a user interface. |
isList : boolean | Gets a value that indicates if the property is a list. |
isProperty : boolean | Gets a value that indicates if this type |
isReadOnly : boolean | Gets whether the value of properties of this type cannot be changed, from the outside. |
isRequired : undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> | Gets or sets a value that indicates if properties of this type are required. |
isRoot : boolean | Gets a value that indicates if this type is the root of its type hierarchy. |
isSimple : boolean | |
isValue : boolean | |
key : string | Gets the key of the property. |
keyName : string | Gets the singular name of |
label : nonEmptyString | Gets or sets the label of this type. |
mixins : Array.<pentaho.type.Type> | Gets or sets the mixin types that are locally mixed into this type. |
name : nonEmptyString | Gets or sets the name of the property type. |
nameAlias : nonEmptyString | Gets or sets the alias for the name of the property type. |
ordinal : number | Gets or sets the ordinal associated with this type. |
root : pentaho.type.Type | Gets the root type of this type hierarchy. |
shortId : nonEmptyString | Gets the short identifier of this type. |
sourceId : nonEmptyString | Gets the source module identifier of this type. |
uid : number | Gets the unique identifier of this type. |
valueType : pentaho.type.ValueType | Gets the type of value that properties of this type can hold. |
Methods
Name | Description |
---|---|
_extend() Static | |
__assertValueTypeReadOnlyConsistent(valueType) | Asserts that a given value type is consistent with the |
__setValueType(value) | Sets the value type of the property. |
_assertNoSubtypesAttribute(attributeName) Protected | Asserts that the type has no subtypes and that as such the given attribute can be set. |
_collectElementValidators(addValidator, owner, value) Protected | Called each time a property value is validated to collect the list of element validators. |
_fillSpecInContext(spec, keyArgs) : boolean Protected | Fills the given specification with this type's attributes' local values, and returns whether any attribute was actually added. |
_getLabelDefault() : string Protected | Gets the default label of the property. |
_init(spec, keyArgs) : object Protected | Performs initialization tasks that take place before the instance is extended with its spec. |
_postInit(spec, keyArgs) Protected | Performs initialization tasks that take place after the instance is extended with its specification. |
_toSpecInContextCore(keyArgs) : pentaho.type.spec.IType Protected | Called to actually create a specification of this anonymous type, when it is the first time that this type occurs in the ambient specification context. |
_validateValueOn(owner, value) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError> Protected | Validates the given non-null value in the context of this property. |
countMaxOn(owner) : number | Evaluates the value of the |
countMinOn(owner) : number | Evaluates the value of the |
countRangeOn(owner) : pentaho.IRange.<number> | Evaluates the element count range of a property of this type on a given complex value. |
create(instSpec, instKeyArgs) : pentaho.type.Instance | Creates or resolves an instance of this type given an instance reference. |
createAsync(instSpec, instKeyArgs) : Promise.<pentaho.type.Instance> | Creates or resolves an instance of this type, asynchronously, given an instance reference. |
defaultValueOn(owner) : pentaho.type.Value | Gets a default value for use in a given |
is(value) : boolean | Determines if a value is an instance of this type. |
isApplicableOn(owner) : boolean | Evaluates the value of the |
isEnabledOn(owner) : boolean | Evaluates the value of the |
isRequiredOn(owner) : boolean | Evaluates the value of the |
isSubtypeOf(superType) : boolean | Determines if this is a subtype of another. |
to(value, keyArgs) : pentaho.type.Instance | Converts a value to an instance of this type, if it is not one already. |
toJSON() : JsonValue | Creates a JSON specification that describes this type. |
toSpec(keyArgs) : pentaho.type.spec.TypeReference | Creates a specification that describes this type. |
toSpecInContext(keyArgs) : pentaho.type.spec.TypeReference | Creates a specification that describes this type. |
toString() : string | Returns a textual representation suitable to identify this type in an error message. |
toValueOn(defaultValueOwner, valueSpec) : pentaho.type.Value | Converts the given value or value specification to a value of this property's value type. |
validateOn(owner) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError> | Determines if this property is valid on a given complex instance. |
Constructor Details
new PropertyType() Abstract |
---|
Creates a property type object. Source: javascript/web/pentaho/type/Property.js, line 41 See also: pentaho.type.Complex |
Members Details
_isLabelSet: boolean Protected |
---|
Gets a value that indicates if the label is locally set. Source: javascript/web/pentaho/type/InstanceType.js, line 652 Overrides: pentaho.type.mixins.DiscreteDomainType#_isLabelSet |
alias: nonEmptyString |
---|
Gets the alias for the identifier of this type. The alias of a type can only be specified when extending the ancestor type. This attribute is not inherited. When unspecified, defaults to Source: javascript/web/pentaho/type/InstanceType.js, line 515 Overrides: pentaho.type.mixins.DiscreteDomainType#alias See also: pentaho.type.Type#id |
ancestor: pentaho.type.Type |
---|
Gets the parent type in the current type hierarchy, if any, or The root type returns Source: javascript/web/pentaho/type/InstanceType.js, line 265 Overrides: pentaho.type.mixins.DiscreteDomainType#ancestor See also: pentaho.type.Type#root , pentaho.type.Type#hasDescendants |
application: object |
---|
Gets or sets the The application property serves as a collection of properties specific to the container application that can be modified via the Setting this to a Source: javascript/web/pentaho/type/InstanceType.js, line 670 Overrides: pentaho.type.mixins.DiscreteDomainType#application |
category: nonEmptyString |
---|
Gets or sets the category associated with this type. The category is used primarily to group similar types (or instances of) in a user interface. Attempting to set to a non-string value type implicitly converts the value to a string before assignment. Setting this to Setting this to Source: javascript/web/pentaho/type/InstanceType.js, line 739 Overrides: pentaho.type.mixins.DiscreteDomainType#category See also: pentaho.type.Type#isBrowsable , pentaho.type.Type#ordinal |
countMax: undefined | number | pentaho.type.spec.PropertyDynamicAttribute.<number> |
---|
Gets or sets the maximum number of elements that properties of this type can have. A non-negative integer. Note that this attribute is taken together with the This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, a property type having a Because this attribute is also dynamic, the actual This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value; or, When set to a When set and the property already has The default (root) Source: javascript/web/pentaho/type/Property.js, line 1258 See also: pentaho.type.Complex#countRangeOf , pentaho.type.spec.IPropertyType#countMax |
countMin: undefined | number | pentaho.type.spec.PropertyDynamicAttribute.<number> |
---|
Gets or sets the minimum number of elements that properties of this type must have. A non-negative integer. Note that this attribute is taken together with the This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, a property type having a Because this attribute is also dynamic, the actual This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value or When set to a When set and the property already has The default (root) Source: javascript/web/pentaho/type/Property.js, line 1171 See also: pentaho.type.Complex#countRangeOf , pentaho.type.spec.IPropertyType#countMin |
declaringType: pentaho.type.ComplexType |
---|
Gets the complex type that declares this property type. |
defaultValue: pentaho.type.Value | pentaho.type.spec.PropertyDynamicAttribute.<?pentaho.type.spec.Value> |
---|
Gets or sets the default value of properties of this type. The default value is the "prototype" value that properties of this type take, on complex instances, when the property is unspecified or specified as a The value This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a GetWhen got and the default value (local or inherited) is not an instance of the value type (local or inherited), SetWhen set and the property already has When set to When set to the control value
When set to a function, it is accepted. For each complex instance, the function is evaluated and its result converted to the property type's When set to any other value, it is immediately converted to the property type's |
description: nonEmptyString |
---|
Gets or sets the description of this type. Attempting to set to a non-string value type implicitly converts the value to a string before assignment. Setting this to Setting this to Source: javascript/web/pentaho/type/InstanceType.js, line 699 Overrides: pentaho.type.mixins.DiscreteDomainType#description |
domain: undefined | Array.<pentaho.type.Element> | pentaho.type.spec.PropertyDynamicAttribute.<Array.<pentaho.type.Element>> |
---|
Gets or sets the list of valid values (or a function that evaluates to these) of properties of this type. This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function, its value is the same for every complex instance. This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, the list of valid values can only be successfully reduced. When the Because this attribute is also dynamic, the actual This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value; or, When set to a When set and the property already has When the The last specified domain determines the order. Source: javascript/web/pentaho/type/mixins/DiscreteDomain.js, line 80 See also: pentaho.type.Complex#domainOf , pentaho.type.mixins.spec.IDiscreteDomainType#domain |
domainOn: |
---|
Evaluates the value of the Source: javascript/web/pentaho/type/mixins/DiscreteDomain.js, line 68 Inherited From: pentaho.type.mixins.DiscreteDomainType#domainOn See also: pentaho.type.PropertyType#domain |
elementType: pentaho.type.Type |
---|
Gets the element type of this type. If this type is a Source: javascript/web/pentaho/type/InstanceType.js, line 420 Overrides: pentaho.type.mixins.DiscreteDomainType#elementType See also: pentaho.type.Type#isList , pentaho.type.Type#isElement , pentaho.type.ListType#of |
elemName: string |
---|
Gets the singular name of Source: javascript/web/pentaho/type/Property.js, line 209 Default Value: "property" |
hasDescendants: boolean |
---|
Gets a value that indicates if this type has any descendant types. Source: javascript/web/pentaho/type/InstanceType.js, line 278 Overrides: pentaho.type.mixins.DiscreteDomainType#hasDescendants See also: pentaho.type.Type#ancestor |
helpUrl: nonEmptyString |
---|
Gets or sets a URL pointing to documentation associated with this type. Attempting to set to a non-string value type implicitly converts the value to a string before assignment. Setting this to Setting this to Source: javascript/web/pentaho/type/InstanceType.js, line 775 |
id: nonEmptyString |
---|
Gets the identifier of this type. The identifier of a type can only be specified when extending the ancestor type. The identifier is only defined for types which have an associated AMD/RequireJS module. However, note that all have a This attribute is not inherited. When unspecified, defaults to the value of Source: javascript/web/pentaho/type/InstanceType.js, line 449 Overrides: pentaho.type.mixins.DiscreteDomainType#id See also: pentaho.type.Type#sourceId |
index: number |
---|
Gets the index of the property in the containing complex type. |
instance: pentaho.type.Instance |
---|
Gets the prototype of the instances of this type. Source: javascript/web/pentaho/type/InstanceType.js, line 290 |
isAbstract: boolean |
---|
Gets a value that indicates if this type is abstract. This attribute can only be set once, upon the type definition. Source: javascript/web/pentaho/type/InstanceType.js, line 538 Default Value: false Overrides: pentaho.type.mixins.DiscreteDomainType#isAbstract |
isAdvanced: boolean |
---|
Gets or sets the Types with Setting this to a Source: javascript/web/pentaho/type/InstanceType.js, line 842 Overrides: pentaho.type.mixins.DiscreteDomainType#isAdvanced See also: pentaho.type.Type#isBrowsable |
isApplicable: undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> |
---|
Gets or sets a value or function that indicates if properties of this type are applicable. When a property is not (currently) applicable, then it does not apply, as it does not make sense in a certain situation. It may only be applicable when another property of the complex type has a specific value, for example. When a property is not currently applicable, its value is not significant and, as such, any validations concerning it are not performed. This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, a property type marked as applicable can later be marked as not applicable. However, a property type marked as not applicable can no longer go back to being applicable. Because this attribute is also dynamic, the actual This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value; or, When set to a When set and the property already has The default (root) Source: javascript/web/pentaho/type/Property.js, line 1341 See also: pentaho.type.PropertyType#isRequired , pentaho.type.Complex#isApplicableOf , pentaho.type.spec.IPropertyType#isApplicable |
isBoundary: boolean |
---|
Gets or sets whether the property is a boundary property. A boundary property identifies the limits of the aggregate of its If the value type is a The validity of the object with a boundary property is not affected by the validity of the property's value (or values). Also, changes within its value(s) do not bubble through it. Boundary properties do not cause their values to hold inverse references to the property holder. This means that, in objects connected by boundary properties, only the property holders prevent their values from being garbage collected, and not the other way round. On the contrary, non-boundary properties form object aggregates that can only be garbage-collected as a whole. GetThe default value is SetOnly a root property type can set its boundary attribute. When set on a non-root property type, an error is thrown. When set and the root property already has When set to a Otherwise, the set value is converted to boolean, by using Source: javascript/web/pentaho/type/Property.js, line 761 Default Value: false |
isBrowsable: boolean |
---|
Gets or sets the Browsable types are exposed to the end user. Set this attribute to Setting this to a Source: javascript/web/pentaho/type/InstanceType.js, line 808 Overrides: pentaho.type.mixins.DiscreteDomainType#isBrowsable |
isComplex: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 374 |
isContainer: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 339 Overrides: pentaho.type.mixins.DiscreteDomainType#isContainer |
isContinuous: boolean |
---|
Gets a value that indicates if this is a continuous type. A non-continuous type is said to be categorical. The default implementation returns false. The types Source: javascript/web/pentaho/type/InstanceType.js, line 402 Overrides: pentaho.type.mixins.DiscreteDomainType#isContinuous |
isElement: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 363 |
isEnabled: undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> |
---|
Gets or sets a value, or function, that indicates if properties of this type can be changed by a user, in a user interface. A property should be set disabled whenever its value is implied/imposed somehow, and thus cannot be changed directly by the user through a user interface. This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, a property type marked as enabled can later be marked as not enabled. However, a property type marked as not enabled can no longer go back to being enabled. Because this attribute is also dynamic, the actual This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value; or, When set to a When set and the property already has The default (root) Source: javascript/web/pentaho/type/Property.js, line 1422 See also: pentaho.type.Complex#isEnabledOf , pentaho.type.spec.IPropertyType#isEnabled |
isList: boolean |
---|
Gets a value that indicates if the property is a list. A property is a list property if its |
isProperty: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 326 Overrides: pentaho.type.mixins.DiscreteDomainType#isProperty |
isReadOnly: boolean |
---|
Gets whether the value of properties of this type cannot be changed, from the outside. If the value type is a This attribute can only be set when defining a root property or an abstract property type. When the property belongs to a The default read-only value of Source: javascript/web/pentaho/type/Property.js, line 389 See also: pentaho.type.ValueType#isReadOnly , pentaho.type.PropertyType#valueType |
isRequired: undefined | boolean | pentaho.type.spec.PropertyDynamicAttribute.<boolean> |
---|
Gets or sets a value that indicates if properties of this type are required. When a property is of a required property type, it is considered invalid if its value (in a complex instance) is Note that this attribute is taken together with the This attribute is DynamicWhen a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance. When a dynamic attribute is set to a value other than a function or a This attribute is MonotonicThe value of a monotonic attribute can change, but only in some, predetermined monotonic direction. In this case, a property type marked as not required can later be marked as required. However, a property type marked as required can no longer go back to being not required. Because this attribute is also dynamic, the actual required values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take effect. This attribute is InheritedWhen there is no local value, the effective value of the attribute is the inherited effective value. The first set local value must respect the monotonicity property with the inherited value. Other characteristicsThe value got by the attribute is the last set local, value, if any - a function, a constant value or When set to a When set and the property already has The default (root) Source: javascript/web/pentaho/type/Property.js, line 1081 See also: pentaho.type.Complex#isRequiredOf , pentaho.type.spec.IPropertyType#isRequired |
isRoot: boolean |
---|
Gets a value that indicates if this type is the root of its type hierarchy. Source: javascript/web/pentaho/type/InstanceType.js, line 249 Overrides: pentaho.type.mixins.DiscreteDomainType#isRoot See also: pentaho.type.Type#root |
isSimple: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 386 |
isValue: boolean |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/InstanceType.js, line 314 |
key: string |
---|
Gets the key of the property. The key of a property is its name. |
keyName: string |
---|
Gets the singular name of Source: javascript/web/pentaho/type/Property.js, line 218 Default Value: "name" |
label: nonEmptyString |
---|
Gets or sets the label of this type. When set to a non- When set to an empty string or a nully value, the attribute value is reset. When reset, the attribute assumes its default value (except on the top-root type, The default value is the inherited value. The initial value of the attribute on the top-root type is Source: javascript/web/pentaho/type/InstanceType.js, line 613 Overrides: pentaho.type.mixins.DiscreteDomainType#label |
mixins: Array.<pentaho.type.Type> |
---|
Gets or sets the mixin types that are locally mixed into this type. Can be set to either type identifiers, instance classes or type instances and arrays thereof. The attributes defined by the added mixin types become available for extension/configuration on this type. When extending, mixins are always applied first. When set to a Source: javascript/web/pentaho/type/InstanceType.js, line 557 |
name: nonEmptyString |
---|
Gets or sets the name of the property type. The name of a property type identifies it within its SetThis attribute must be set when defining a new property type, and cannot be changed afterwards. When set to a non- Source: javascript/web/pentaho/type/Property.js, line 287 See also: pentaho.type.spec.IPropertyType#name |
nameAlias: nonEmptyString |
---|
Gets or sets the alias for the name of the property type. The alias for the name of a property type is an alternative identifier for serialization purposes. SetThis attribute can only be set when defining a new property type, and cannot be changed afterwards. When set to a non- |
ordinal: number |
---|
Gets or sets the ordinal associated with this type. The ordinal is used to disambiguate the order with which a type (or an instance of it) is shown in a user interface. Setting this to a Source: javascript/web/pentaho/type/InstanceType.js, line 875 Overrides: pentaho.type.mixins.DiscreteDomainType#ordinal See also: pentaho.type.Type#isBrowsable , pentaho.type.Type#category |
root: pentaho.type.Type |
---|
Gets the root type of this type hierarchy. Even though the ultimate type root of types defined in this system is When deriving a type from Typically, root types are immediate subtypes of For example, Source: javascript/web/pentaho/type/InstanceType.js, line 206 Overrides: pentaho.type.mixins.DiscreteDomainType#root See also: pentaho.type.Type#isRoot , pentaho.type.Type#ancestor |
shortId: nonEmptyString |
---|
Gets the short identifier of this type. The short identifier of a type is equal to its alias, provided it is defined. Otherwise, it is equal to the identifier. Source: javascript/web/pentaho/type/InstanceType.js, line 492 Overrides: pentaho.type.mixins.DiscreteDomainType#shortId See also: pentaho.type.Type#id , pentaho.type.Type#alias |
sourceId: nonEmptyString |
---|
Gets the source module identifier of this type. The source identifier is the module identifier of the actual AMD/RequireJS module that provides the type and may be different from the The source identifier is used to resolve module identifiers relative to the source module. The source identifier of a type can only be specified when extending the ancestor type. This attribute is not inherited. When unspecified, defaults to the value of Source: javascript/web/pentaho/type/InstanceType.js, line 477 Overrides: pentaho.type.mixins.DiscreteDomainType#sourceId See also: pentaho.type.Type#id |
uid: number |
---|
Gets the unique identifier of this type. Unique type identifiers are auto-generated in each session. Note that even anonymous types (those whose This attribute is not inherited. Source: javascript/web/pentaho/type/InstanceType.js, line 200 Overrides: pentaho.type.mixins.DiscreteDomainType#uid |
valueType: pentaho.type.ValueType |
---|
Gets the type of value that properties of this type can hold. If the value type is a The default value type is the inherited value type. A root property type has a default value type of This attribute can only be specified upon property definition. When a Otherwise, the specified value is assumed to be an An error is thrown when the specified value is not a An error is thrown when the specified value is such that its Relation to the |
Methods Details
_extend() Static |
---|
__assertValueTypeReadOnlyConsistent(valueType) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Asserts that a given value type is consistent with the Source: javascript/web/pentaho/type/Property.js, line 501
|
__setValueType(value) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the value type of the property. Source: javascript/web/pentaho/type/Property.js, line 464
|
_assertNoSubtypesAttribute(attributeName) Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Asserts that the type has no subtypes and that as such the given attribute can be set. Source: javascript/web/pentaho/type/InstanceType.js, line 1045 Overrides: pentaho.type.mixins.DiscreteDomainType#_assertNoSubtypesAttribute
|
_collectElementValidators(addValidator, owner, value) Protected | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Called each time a property value is validated to collect the list of element validators. When overriding this method, be sure to also call the base implementation. Source: javascript/web/pentaho/type/Property.js, line 928 Overrides: pentaho.type.mixins.DiscreteDomainType#_collectElementValidators
|
_fillSpecInContext(spec, keyArgs) : boolean Protected | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fills the given specification with this type's attributes' local values, and returns whether any attribute was actually added. This method requires that there currently exists an This method does not add the special Source: javascript/web/pentaho/type/InstanceType.js, line 1248 Overrides: pentaho.type.mixins.DiscreteDomainType#_fillSpecInContext
See also: pentaho.type.Instance#toSpecInContext |
_getLabelDefault() : string Protected | ||||
---|---|---|---|---|
Gets the default label of the property. The label of a root property is reset to a capitalization of the Source: javascript/web/pentaho/type/Property.js, line 708 Overrides: pentaho.type.mixins.DiscreteDomainType#_getLabelDefault
|
_init(spec, keyArgs) : object Protected | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Performs initialization tasks that take place before the instance is extended with its spec. Source: javascript/web/pentaho/type/Property.js, line 137 Overrides: pentaho.type.mixins.DiscreteDomainType#_init
|
_postInit(spec, keyArgs) Protected | |||||||||
---|---|---|---|---|---|---|---|---|---|
Performs initialization tasks that take place after the instance is extended with its specification. This method is typically overridden to validate or default the values of the attributes. Source: javascript/web/pentaho/type/InstanceType.js, line 182 Overrides: pentaho.type.mixins.DiscreteDomainType#_postInit
|
_toSpecInContextCore(keyArgs) : pentaho.type.spec.IType Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Called to actually create a specification of this anonymous type, when it is the first time that this type occurs in the ambient specification context. Source: javascript/web/pentaho/type/InstanceType.js, line 1197 Overrides: pentaho.type.mixins.DiscreteDomainType#_toSpecInContextCore
See also: pentaho.type.Type#_toSpecInContextCore |
_validateValueOn(owner, value) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError> Protected | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Validates the given non-null value in the context of this property. The base implementation calls When overriding this method, the error utilities in Source: javascript/web/pentaho/type/Property.js, line 887
|
countMaxOn(owner) : number | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the value of the This method is used to determine the effective Source: javascript/web/pentaho/type/Property.js, line 1241
See also: pentaho.type.PropertyType#countMax |
countMinOn(owner) : number | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the value of the This method is used to determine the effective Source: javascript/web/pentaho/type/Property.js, line 1154
See also: pentaho.type.PropertyType#countMin |
countRangeOn(owner) : pentaho.IRange.<number> | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the element count range of a property of this type on a given complex value. The element count range is a conciliation of the effective value of the following attributes:
The logic can be best explained by the following simple example function: When the property is not a If The Source: javascript/web/pentaho/type/Property.js, line 1530
See also: pentaho.type.Complex#countRangeOf |
create(instSpec, instKeyArgs) : pentaho.type.Instance | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates or resolves an instance of this type given an instance reference. This method delegates to Source: javascript/web/pentaho/type/InstanceType.js, line 977 Overrides: pentaho.type.mixins.DiscreteDomainType#create
See also: pentaho.type.Type#createAsync , pentaho.type.Type#to , pentaho.type.Type#is Examples Create a complex instance from a specification that contains the type inline. require(["pentaho/type/Instance", "pentaho/type/standard"], function(Instance) { var product = Instance.type.create({ _: { props: ["id", "name", {name: "price", valueType: "number"}] }, id: "mpma", name: "Principia Mathematica", price: 1200 }); // ... }); Create a list instance from a specification that contains the type inline. require(["pentaho/type/Instance", "pentaho/type/standard"], function(Instance) { var productList = Instance.type.create({ _: [{ props: ["id", "name", {name: "price", valueType: "number"}] }], d: [ {id: "mpma", name: "Principia Mathematica", price: 1200}, {id: "flot", name: "The Laws of Thought", price: 500} ] }); // ... }); Create an instance from a specification that does not contain the type inline. require(["pentaho/type/Instance", "pentaho/type/standard"], function(Instance) { var ProductList = Instance.type.create([{ props: [ "id", "name", {name: "price", valueType: "number"} ] }]); // Provide the default type, in case the instance spec doesn't provide one. var productList = ProductList.type.create([ {id: "mpma", name: "Principia Mathematica", price: 1200}, {id: "flot", name: "The Laws of Thought", price: 500} ]); // ... }); |
createAsync(instSpec, instKeyArgs) : Promise.<pentaho.type.Instance> | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates or resolves an instance of this type, asynchronously, given an instance reference. This method delegates to Source: javascript/web/pentaho/type/InstanceType.js, line 998 Overrides: pentaho.type.mixins.DiscreteDomainType#createAsync
See also: pentaho.type.Type#create |
defaultValueOn(owner) : pentaho.type.Value | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a default value for use in a given Ensures that list properties always have a non-null default value. Source: javascript/web/pentaho/type/Property.js, line 679
|
is(value) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a value is an instance of this type. Source: javascript/web/pentaho/type/InstanceType.js, line 1059 Overrides: pentaho.type.mixins.DiscreteDomainType#is
|
isApplicableOn(owner) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the value of the Source: javascript/web/pentaho/type/Property.js, line 1328
See also: pentaho.type.PropertyType#isApplicable |
isEnabledOn(owner) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the value of the Source: javascript/web/pentaho/type/Property.js, line 1409
See also: pentaho.type.PropertyType#isEnabled |
isRequiredOn(owner) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Evaluates the value of the This method is used to determine the effective Source: javascript/web/pentaho/type/Property.js, line 1064
See also: pentaho.type.PropertyType#isRequired |
isSubtypeOf(superType) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if this is a subtype of another. A type is considered a subtype of itself. Source: javascript/web/pentaho/type/InstanceType.js, line 1071 Overrides: pentaho.type.mixins.DiscreteDomainType#isSubtypeOf
|
to(value, keyArgs) : pentaho.type.Instance | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Converts a value to an instance of this type, if it is not one already. If a Otherwise, if a given value is not already an instance of this type (checked using Source: javascript/web/pentaho/type/InstanceType.js, line 1092 Overrides: pentaho.type.mixins.DiscreteDomainType#to
|
toJSON() : JsonValue | ||||
---|---|---|---|---|
Creates a JSON specification that describes this type. Attributes which do not have a JSON-compatible specification are omitted. Specifically, attributes with a function value are not supported. This method simply calls Source: javascript/web/pentaho/type/InstanceType.js, line 1223 Overrides: pentaho.type.mixins.DiscreteDomainType#toJSON
See also: pentaho.type.Instance#toSpec |
toSpec(keyArgs) : pentaho.type.spec.TypeReference | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this type. If an This method creates a new This method returns a reference to this type that is appropriate to be the value of an When a type has an identifier, its For anonymous types, a Source: javascript/web/pentaho/type/InstanceType.js, line 1137 Overrides: pentaho.type.mixins.DiscreteDomainType#toSpec
See also: pentaho.type.Type#toSpecInContext , pentaho.type.Type#_fillSpecInContext |
toSpecInContext(keyArgs) : pentaho.type.spec.TypeReference | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this type. This method requires that there currently exists an This method handles the cases where this type has an Source: javascript/web/pentaho/type/InstanceType.js, line 1166 Overrides: pentaho.type.mixins.DiscreteDomainType#toSpecInContext
See also: pentaho.type.Type#toSpec |
toString() : string | ||||
---|---|---|---|---|
Returns a textual representation suitable to identify this type in an error message. Source: javascript/web/pentaho/type/InstanceType.js, line 1293 Overrides: pentaho.type.mixins.DiscreteDomainType#toString
|
toValueOn(defaultValueOwner, valueSpec) : pentaho.type.Value | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Converts the given value or value specification to a value of this property's value type. If the given value is already an instance of the property's value type, it is returned. By default, if, Source: javascript/web/pentaho/type/Property.js, line 639
|
validateOn(owner) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError> | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if this property is valid on a given complex instance. If this property is not a Afterwards, the cardinality is verified against the attributes Source: javascript/web/pentaho/type/Property.js, line 825
See also: pentaho.type.Complex#validate |