Platypus defines a number of methods within the business layer that the presentation layer may call upon. The definitions allow Billabong and Pond to autogenerate the methods to be called as well as the actual call to the method. Some of these methods are available to the presentation layer from any business object, while others might be restricted to the business object for this presentation object or the 'common' directory (e.g. reports).
Business objects that accessible by the presentation layer are called 'POBOs' for convenience. In general, the aim within Platypus is to have the presentation layer deal with Strings only. This allows a reduction in complexity for the presentation layer and helps the separation of presentation and business logic in the application.
The methods defined for autogeneration are:
A number of the methods above have a format parameter. Platypus provides a class called FormatUtil that handles formatting data for display. This allows the business layer to handle data in numerous types, e.g. dates, numbers, etc. and format it appropriately as a String for the presentation layer. Normally, if the data is extracted from the database, the business layer uses the data's type internally for processing and only converts to a String for the presentation layer.
For details on the formats available and how to use them, refer to the FormatUtil.java file in the src/production directory of the distribution.
FormatUtil also contains a number of methods to convert data from presentation layer display strings back to data usable by the data layer. In version 1.0, this is limited to date related methods.
Note that there is no restriction on the presentation layer directly calling the FormatUtil class. In the Platypus tutorial, there are examples of this in a few files.