This diagram shows the interaction between the Controller class that receives the incoming http request and all the other classes that manage the event creation and its procession.
The controller servlet gets the incoming http request that contains the data to process; the request object contains also the data that identify the event to instantiate and execute.
Then, the controller instantiates the
The controller servlet calls the
generatePrimaryEvent() gets the
parameter from the
request, try to
identify the related event type (database or navigation) and then uses the appropriate factory
to create the related event object.
generatePrimaryEvent() returns the event
object to the controller.
The controller servlet checks if the returned event object is an instance of a
Database event (i.e.: insert, delete, update events).
If yes, validate the incoming data
(the validation step occurs only if the
formValidatorName request parameter
exist and the current event is an
The controller executes the
that uses the
Commons-Validator Jakarta component)
and process the event object.
Note: the Navigation events are managed by the
The controller manages only the database events.
The controller servlet checks if the evetEngine has got involved tables: it find out which tables where on the jsp page (the view); one jsp file may contain multiple (db)forms, and each forms could contain many subforms nested inside.
If yes, the controller gets the list of all the involved tables, generates and executes update events for all of them.
The controller servlet forwards the client to the target resource referred from the
attribute of the jsp form if there are no errors.
Else redirects to the resource specified by the
followUpOnError form attribute.