JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   14.  'Business Object' Reference
 


14.1 Application Object

DescriptionThe application object in the business object model just holds a list of jars/assemblies and their data-view names.
ImplementsClassIndexer
Contained
Lists
1
Name  jarBase
Type  jarBase
Description  Specifies assemblies/jars built as part of the application.
Indexed property  name
 
2
Name  style
Type  String
Description  You can specify one or more styles to give information to the code generation scripts. The meaning of the styles is up to the script writer.

The styles can be used as flags by the script calling $styleList.contains( "styleOfInterest" )

[ Currently, there is no built-in support for style="styleType=value" type semantics. This would have to be defined by each script writer. ]

Examples of the use of styles:
  • characteristics of a web page (e.g. should it be included in one of the menus)
  • whether an entity should be automatically mapped to a data-view (the 'maintain' style).
Note that styles and the 'group' property are different concepts, and therefore complimentary. Many modelling objects - such as data-views and their fields, or business methods - can be put into groups as a hint as to where to render the UI pages. Typically groups are used to define 'where' to place the meta class, whereas styles indicate how to render the object.
Unique  false
Inherited
properties
description (base property)

template (base property)

text (base property)

jwpattern (base property)

 14.1.1  Property 'name'
 14.1.2  Property 'package'
 14.1.3  Property 'headerComment'
 14.1.4  Property 'customerHeaderComment'
 14.1.5  Property 'constraintExceptionType'
 14.1.6  Property 'generateLogLevel'
 14.1.7  Property 'generateMaintenanceSession'
 14.1.8  Property 'generateDataViewForEntity'
 14.1.9  Property 'generatePagesForBusinessMethods'
 14.1.10  Property 'convertEmptyStringsToNull'
 14.1.11  Property 'generateDataviewImplClass'
 14.1.12  Property 'uid'

14.1.1  Property 'name'
DescriptionThe name for the Application EAR file.
TypeString
DefaultTheApplication

14.1.2  Property 'package'
Aliasnamespace
DescriptionThis is the package attribute: it declares the name of the package that this interface (or class, or entity, etc.) belongs to.

It can be used on

  • reference types (interfaces and classes) and all their derivatives
  • associations
  • assemblies of model-objects
  • containers of same, like jars.
It uses delegation of responsibility to search its parent chain. For example, in the J2EE realm, this means that the package can be specified on (working up the containment chain):

  • an entity,
  • or its ejb-jar,
  • or the application,
  • or in the assembly
  • or in the build properties '.jwp' file.
If none of these is specified the package will be null. Null packages are not recommended but legal for simple Java builds. For larger systems, null packages are not allowed.

The combination of the package and class name (i.e. the fully-qualified Java classname) must be unique across all reference types and their derivatives in a build.
TypeString
Delegatestrue

14.1.3  Property 'headerComment'
DescriptionOptional header comment. If present, this is placed in a comment at the top of the generated file.

This is typically used for a copyright statement.

This is a delegated property - it can be added to the jar (or the application if present) and will be used for all children.
TypeString
Delegatestrue
Support Element Inputstrue

14.1.4  Property 'customerHeaderComment'
DescriptionOptional customer header comment.

If present, this is placed in a comment at the top of generated files that will be maintained by the customer.

This is typically used for a customer copyright statement.

This is a delegated property - it can be added to the jar (or the application if present) and will be used for all children.
TypeString
Delegatestrue
Support Element Inputstrue

14.1.5  Property 'constraintExceptionType'
DescriptionThe constraintExceptionType is the type of the exception which is thrown if the constraint fails.

It can be any valid class name - probably defined by a 'jwclass'. It could be, for example, a specific class of business exception which should be thrown for this constraint.

If this is not in the same package as the build module (e.g. in the EJB Jar or Ear), then the name should be qualified by the package name.

The constraintExceptionType is available on constraints, objects and assemblies, and can also be set in the top level properties build file (e.g. build.jwp).

Because this is a delegated property, the actual value used is whichever instance is encountered first, working up from the validation object. This means it is very easy to specialise the exceptions thrown in part of the specification tree (e.g. one session EJB), leaving the rest unchanged.

Failing any value at all, 'RuntimeException' is used ... but clearly this should not be used in production systems.
TypeString
Delegatestrue

14.1.6  Property 'generateLogLevel'
DescriptionShould be a number for the trace level priority to generate code. Any lower priority traces will be filtered out at *generate* time. Most tracing mechanisms, such as log4j, can also filter traces at run-time.

The priorities are
  • 1 = Fatal
  • 2 = Error
  • 4 = Warning
  • 6 - Info
  • 8 - Debug (Fine)
  • 9 - DetailedDebug (Finest)
This is a delegated property.

The default can be set for builds by setting generateLogLevel in the build properties.
TypeString
Delegatestrue

14.1.7  Property 'generateMaintenanceSession'
DescriptionSet this flag to 'true' to generate the maintenance session bean for this data-view. This is a delegated property, so it can be set in the jar/assembly, application or top-level configuration properties. By default it is set to 'true'. If you want to disable this for a particular object, set the value to 'false'.

The standard patterns will automatically generate methods on the session bean to
  • search for the object
  • view/update the object
  • delete the object.
Typeboolean
Defaulttrue
Delegatestrue

14.1.8  Property 'generateDataViewForEntity'
DescriptionSet this to 'true' to generate the data view for this entity. By default, data views are generated for entities based on a setting in the system.properties file. If you want to disable this for a particular object, set the value to 'false'.

The default pattern copies all fields from the entity to the data-view.
Typeboolean
Delegatestrue

14.1.9  Property 'generatePagesForBusinessMethods'
DescriptionSet this to 'true' to generate pages based on a business method.

The default for this value (which is true in the standard distribution) comes from the generatePagesForBusinessMethods setting in the system.properties file. If you want to disable this for a particular object, set the value to 'false'.

The standard pattern triggered by this value creates a page with a single button that will be linked to the business method.
Typeboolean
Delegatestrue

14.1.10  Property 'convertEmptyStringsToNull'
DescriptionThis delegated property when set causes empty values, on input (e.g. on screens) into optional fields, to be converted to null. This property is present on the attribute or data-view-field and their parents. This property has no effect on required values.

By default, this property is set (in the Business Object Model's system.properties).

If this value is not set, there is no way to express 'no value' on input screens.
Typeboolean
Delegatestrue

14.1.11  Property 'generateDataviewImplClass'
DescriptionIf this property is true, the rendering creates both an implementation class and a base class.

The default is false, which will create just the one class (with the implementation name, but with the base implementation).

This flag only needs to be set where additional methods will need to be implemented by hand to support the operation of the data-view.
Typeboolean
Delegatestrue

14.1.12  Property 'uid'
DescriptionThe 'uid' is a Unique IDentifier for a methods in the business object model (and derivatives like J2EE).

The 'uid' uniquely identifies the method, even if the name or signature of the method changes.

This will normally be generated by the modelling tool; if not, it can be entered manually (but make sure it is unique!).
TypeString
 


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