Portlet Factory, Version 6.1.2
Overview of builder architecture
A builder is a discrete bundle of functionality in the construction of a WebApp.
Of the builders that are supplied in IBM® WebSphere Portlet Factory, some are primitive and do very simple things, like adding a page to the WebApp, or putting a button on a page. Others are complex, and can construct an entire form along with the Java™ code required to move data between the form and a variable.
There are three critical pieces to a builder.
- Builder Definition file (bdef)
- This XML file defines the builder for the WebSphere Portlet Factory to know both how to invoke it and how to display instances of it to the user of the builder. Among other things, it defines what the inputs are to this builder. In our example, the builder has only two inputs, the name of the builder and the directory which contains the HTML files to which it is going to create links.
- Builder class
- This is a Java class which performs the automation task. It is run at generate time, and it is expected to make some changes to the WebApp.
- Coordinator class (optional)
- This Java class is run when you edit an instance of the builder, a builder call. The coordinator can modify the builder user interface on-the-fly to hide or show input fields, for example, to change the list of choices in a list. Typically, the coordinator is just used to set the initial value of one of the inputs to a value that is calculated. (If the initial value were static, you can set it in the builder definition file.)
Parent topic: Working with WebSphere Portlet Factory Parent topic: About adding elements to pages in the web application
- About model-based builder creation
A model-based builder is a builder that you create and is based on a model.
- Implementation of generation behavior
Implement the builder generation behavior by implementing the following interface:
- About creating builder definitions
The builder definition is an XML file that defines the builder characteristics; for example, the builder generation class, help file, domain type, and builder picker category.
- About implementing a coordinator
The coordinator class allows you to dynamically modify the builder call editor for your builder depending on the value of an input.
- Creating a new model wizard
You can create your own wizard for creating a model in IBM WebSphere Portlet Factory.
- Multi-phase builder generation behavior
For some builders, the order of the builder calls can be important.
- Setting properties for page automation elements
Page automation elements from builders such as Data Page, Data Column Modifier, or Rich Data Definition, have generic properties associated with them.
- Builder input widgets
This topic provides details on all builder input widget names and arguments provided by IBM WebSphere Portlet Factory Designer for use by builder authors.
Library | Support |