Form data helper functions
The FormData class that you extend your class from includes some helper methods for common tasks.
|
Method |
Description |
|---|---|
|
|
Creates a parent XML node and a list of child nodes. You specify a container name, a child element
name, and a list of children elements. Specify the list of children elements as an iterable collection
of |
|
|
Creates an XML node with the specified name and text content. |
|
|
Given an array, a filter (a Gosu block) and a mapping operation (a Gosu block), this method produces
a set as the output. The set contains the result of the mapping applied to every element in the array
for which filter returns |
Additionally, several useful generic inference classes are defined in the package
gw.forms.generic that might help in your form design. The following table lists helper
classes in this package.
|
Class |
Description |
|---|---|
|
|
Abstract class that you can subclass to easily deal with forms with multiple instances of the same form attached to the policy. This class assumes that the forms have a one-to-one relationship with some entity on the policy. The class also assumes there is a corresponding FormAssociation entity subtype that tracks which form points to which entity. |
|
|
Base class for any form that does not need any data to be gathered and packaged, but needs a simple availability script. Subclassing classes must implement the isAvailable method to indicate whether or not to add the form. |
|
|
Base class for any form to always add to a policy whenever the form is available. Using this class with no further subclassing directly leads to a form with no data populated. However, you can extend this class and override the addDataForComparisonOrExport method to output your data. |
|
|
Base class for removal and replacement endorsement form. It checks if any forms were completely
invalidated or replaced and that also set this form as their removal endorsement form number. If such
a form is found, PolicyCenter creates a form that contains a parent |
|
|
Base class for a generic removal endorsement form. It checks if any forms were completely invalidated
and that also set this form as their removal endorsement form number. If such a form is found, it
creates a form that contains a parent |
The usage of the term “generic” in the package and class naming of the preceding classes means the classes include common functionality that you can subclass as desired. They do not necessarily use Gosu generics features. However, the AbstractMultipleCopiesForm class does use Gosu generics.
