|
|
|
The Model-Driven System Builder
|
|
JeeWiz Architect's Guide
|
|
|
|
Contents >
16. 'JeeWiz' Reference
|
|
|
16.11 MetaPropertyBase Object
| Superclass | metaElementBase |
| Subclassed By |
|
| Description | The meta property base is the base for meta-property.
Eventually it may be used as a base for a new type of property (a meta-class reference property, not yet implemented).
|
Contained Lists |
|
Inherited properties |
|
16.11.1 Property 'alias'
|
| Description | Defines a synonym for a property.
This will create a getter and setter of this name, but use the underlying property for storage, validation and so on.
|
| Type | String |
16.11.2 Property 'required'
|
| Description | If set true, this value must be specified.
This is only meaningful for non-primitive values in the current language (e.g. it is meaningful for a Java Boolean, but not a boolean). When 'required=true' is specified for primitive values, it is silently ignored.
|
| Type | boolean |
| Default | false |
16.11.3 Property 'type'
|
| Description | The type for this object. This should be an underlying Java type, or the name of a meta-class.
To disambiguate, meta-classes in base meta-models can be referred to using 'baseMetaModel:metaClass' syntax.
For example, the java method meta-class is referred to from the BOM meta-model (which also have a 'method' meta-class) as 'java:method'.
The referenced meta-class can be referenced by 'getTypeMetaClass()' in Java, or 'typeMetaClass' in Velocity.
For String lists, getTypeMetaClass() will return null.
|
| Type | String |
| Default | String |
16.11.4 Property 'pattern'
|
| Description | The pattern is used as a validation item for the property. This is in addition to any nested elements that may be present on the object object.
Pattern validation should only be used on String properties. If a pattern is specified on any properties with any other type, a compiler error will occur during the build.
The pattern must be a valid regular expression. During validation of the meta-class, the property will need to match this pattern if a value has been specified; the pattern is ignore for un-specified properties.
Note that, as with normal regular expression usage, a pattern is considered to match a string if the pattern occurs anywhere within the string. If what you really intend is the match the complete string, use the '^' (start anchor) and '$' (end anchor) around the pattern.
This is a shorthand for a pre-phase validator object using the same pattern.
|
| Type | String |
16.11.5 Property 'patternMessage'
|
| Description | Specifies additional information to be inserted into the error message when the pattern fails.
The structure of the error message is
The value {v} for the property {p} does not match the required pattern{pattern-message} (as specified by {pattern})
|
| Type | String |
| Default | String |
16.11.6 Property 'delegate'
|
| Alias | delegated |
| Description | Set this to true if the value of this property should be searched for in the parent meta-class chain.
The point of delegation is to allow easy defaults combined with overrides at each point in the model tree.
It is only used on Strings and booleans; setting it for other types has no effect.
For example, the generate-log-level is delegated.
This value is present on
- constraints (for which extra error logging is generated)
- internal classes (in the business object model) and all its derived classes, such as entities and sessions
- their containing jar (or assembly in .NET) - 'containment' here meaning that the entity is on a list in the jar.
- their application.
This means that when this value is referenced, a search is made for a 'delegate' property being explicitly set on the entity, its parent jar and then its application.
The first one of these that has a value set is used - and given the way this works, there is no point in setting a default on a delegated property because it will not be used.
If none of these is set, the search for a value is continued to
- the applicable 'system.properties' value, and failing that
- a value set in the JeeWiz build properties file (e.g. build.jwp).
In the case of the generate-log-level property, a default value is set in the base system.properties (see jeewiz\resources\base\control\system.properties).
|
| Type | boolean |
| Default | false |
16.11.7 Property 'needsTextArea'
|
| Description | This only applies to String values. Normally, this have a single-line edit field in the XML editor.
To specify that a multi-line edit control should be used, set this true.
|
| Type | boolean |
| Default | false |
16.11.8 Property 'hide'
|
| Description | If the value is hidden, the property will be hidden in modelling tools (i.e. it won't be present in generated profiles)
and a no-op setter will be generated.
However, the underlying getter and field value will still be available, delegated to the base class.
Note that 'hidden' is now used as a property on other meta-models (e.g. bizobject attribute), for attributes and fields not available on the value object.
However, 'hide' is not currently defined on any other meta-models.
|
| Type | boolean |
| Default | false |
16.11.9 Property 'fixed'
|
| Description | If the value is fixed, this field overrides a field of the same name in a base meta-model.
There must be a default, and this will be set into the field's value.
Furthermore, a no-op setter will be generated, effectively making the field unsettable (except via the superclass).
Therefore, this flag makes a field fixed, i.e. unsettable, to the value specified in the 'default' property.
|
| Type | boolean |
| Default | false |
16.11.10 Property 'generateSetterDespiteHide'
|
| Description | If set, this makes a setter available even if the property is hidden.
This means that the value can be set programmatically (by Velocity scripts) but not by the user.
|
| Type | boolean |
| Default | false |
16.11.11 Property 'filterCode'
|
| Description | Where lists need type coercion or other filtering at run-time, specify in this property.
This implements automatic type conversion between Java and CSharp meta-model types.
|
| Type | String |
16.11.12 Property 'default'
|
| Description | The default value for this object.
Strings automatically have "" quotes put around the value. To prevent this and use an expression, put \ in front.
The special case where "" quotes are included is handled as you would expect - extra quotes are not added.
|
| Type | String |
16.11.13 Property 'useInUml'
|
| Description | Set this value to true to specify that the value should be used in the UML profile.
Only set this value if the property is not supplied by the UML tool's standard set of tag values.
If set to true, this property will be included in the auto-generated UML plug-in.
|
| Type | boolean |
| Default | false |
16.11.14 Property 'exportInXmi'
|
| Description | This indicates that this property is required in the translation from XMI.
If set to any non-null value, this property will be included in the auto-generated xslt script.
For default rendering, use 'default'.
For multi-line, comma-separated lists, use 'multiSeperated'.
|
| Type | String |
16.11.15 Property 'delayedDefaultExpression'
|
| Description | Use this property when the default expression depends on a value in the object itself, or one of its children.
This specified delayed default expression will not be inserted as an static default for the property.
Instead, it will be lazily evaluated on first reference, which will occur after values have been read from the model.
|
| Type | String |
Copyright (c) 2001-2008 New Technology/enterprise Ltd.
| |