JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   16.  'JeeWiz' Reference
 


16.11 MetaPropertyBase Object

SuperclassmetaElementBase
Subclassed By
metaProperty
DescriptionThe 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
1
Name  choice
Type  metaChoice
GenerateAllList  false
Inherited
properties
name from metaElementBase.name

description (base property)

template (base property)

text (base property)

jwpattern (base property)

advanced from metaElementBase.advanced

 16.11.1  Property 'alias'
 16.11.2  Property 'required'
 16.11.3  Property 'type'
 16.11.4  Property 'pattern'
 16.11.5  Property 'patternMessage'
 16.11.6  Property 'delegate'
 16.11.7  Property 'needsTextArea'
 16.11.8  Property 'hide'
 16.11.9  Property 'fixed'
 16.11.10  Property 'generateSetterDespiteHide'
 16.11.11  Property 'filterCode'
 16.11.12  Property 'default'
 16.11.13  Property 'useInUml'
 16.11.14  Property 'exportInXmi'
 16.11.15  Property 'delayedDefaultExpression'

16.11.1  Property 'alias'
DescriptionDefines 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.
TypeString

16.11.2  Property 'required'
DescriptionIf 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.
Typeboolean
Defaultfalse

16.11.3  Property 'type'
DescriptionThe 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.
TypeString
DefaultString

16.11.4  Property 'pattern'
DescriptionThe 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.
TypeString

16.11.5  Property 'patternMessage'
DescriptionSpecifies 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})
TypeString
DefaultString

16.11.6  Property 'delegate'
Aliasdelegated
DescriptionSet 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).
Typeboolean
Defaultfalse

16.11.7  Property 'needsTextArea'
DescriptionThis 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.
Typeboolean
Defaultfalse

16.11.8  Property 'hide'
DescriptionIf 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.
Typeboolean
Defaultfalse

16.11.9  Property 'fixed'
DescriptionIf 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.
Typeboolean
Defaultfalse

16.11.10  Property 'generateSetterDespiteHide'
DescriptionIf 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.
Typeboolean
Defaultfalse

16.11.11  Property 'filterCode'
DescriptionWhere 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.
TypeString

16.11.12  Property 'default'
DescriptionThe 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.
TypeString

16.11.13  Property 'useInUml'
DescriptionSet 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.
Typeboolean
Defaultfalse

16.11.14  Property 'exportInXmi'
DescriptionThis 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'.
TypeString

16.11.15  Property 'delayedDefaultExpression'
DescriptionUse 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.
TypeString
 


Copyright (c) 2001-2008 New Technology/enterprise Ltd.