Portlet Factory, Version 6.1.2


 

Objects the Builder Skeleton builder creates

This topics describes the objects that the Builder Skeleton builder creates.

All the Java files are generated under the WEB-INF/work/source folder, for editing within the project. The Builder Skeleton builder generates the following files that are used when creating a builder.

BuilderDef

Created under the WEB-INF/Builders folder. XML file that defines the builder. Specifies the name and description of the builder, the builder Java class name, and the builder help file name. It also describes all of the builder inputs, so that a rich, consistent user interface can be automatically generated when the builder is used.

Note: To see the effects of changes to the builder definition file after you save your model, in Project Explorer, right-click on the project and click Refresh.

Builder Java

This is the builder regen class with a doBuilderCall method that is called whenever a model that contains your Builder is regenerated. The doBuilderCall method must be implemented to modify the WebApp object that is passed as an argument. To do this, the builder can call methods on the WebApp directly, or it can invoke any other builders in the system.

The generated Builder class has an inner Constants class that contains definitions of all the builder input names. These constants are available in all of the other generated Java classes. The generated code for doBuilderRegen also generates variables, which are initialized to the values of each of the builder inputs.

Coordinator Java Class

(Optional) Java class that can be used to implement custom dynamic user interface for the builder. For example, you can create a coordinator when you want a selectable list of choices obtained by calling into some library. Or, you might have one checkbox input which controls showing and hiding other inputs. The generated coordinator class automatically creates a structure with variables for each of your builder inputs. See the generated sample code for examples.

Helper LJO Java Class

(Optional) Many builders make use of a Java class that can be called during execution of the model. (This is quite different from the builder regen class, which is called during regeneration but never during application execution). For example, the Service Call builder has a helper class with an invoke method and other useful execution-time methods. When you generate a helper class, the helper extends the IBM® WebSphere Portlet Factory BuilderHelper class, which makes it easy to access properties and indirect values from builder inputs.

Parent topic: Builder Skeleton builder


Library | Support |