<abstract> new AbstractProperty(propertyTag [, transformers] [, baseTag])
Creates a ValueDef
that references the property of an instance.
Optionally it is possible to 'override' the instance by specifying which transformers to apply
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
propertyTag |
olympe.dc.registry.Property | olympe.df.POString | string | Tag of the property. |
|
transformers |
Array.<!olympe.dc.Transformer> |
<optional> |
Transformers to apply to determine the source instance. |
baseTag |
string |
<optional> |
The base tag for the transformers. |
- Implements:
Methods
-
getBaseTag()
-
Gets the base tag for the transformers, if any.
Returns:
The base tag or
null
.- Type
- string
-
<abstract, protected> getCaster()
-
Casts the property value
Returns:
The caster used by this
ValueDef
to access the value. -
getInternalPath()
-
-
<abstract> getName()
-
-
getPropertyTag()
-
Gets the property tag.
Returns:
The property tag.
- Type
- olympe.dc.registry.Property | olympe.df.POString | string
-
getTransformers()
-
Gets the transformers applied to this
ValueDef
if any.Returns:
The transformers, or
null
.- Type
- Array.<olympe.dc.Transformer>
-
getValue()
-
-
<abstract, protected> getValueType()
-
Return the type of the property
Returns:
- Type
- function
-
serialize()
-
-
setDefaultValue(value)
-
Set a default value this valueDef will use when the property is not defined for an instance.
Parameters:
Name Type Description value
T Returns:
this
-
toString()
-