Customizing differences for new lines of business
If you create a new line of business, you must perform the following tasks to support the difference engine.
- Using some appropriate abbreviation
prefix for the line of business (LOB), create a new
Gosu class called LOB
DiffHelper. In this file, add all of the methods that help you add and filter difference items. Specifically, create a method in this class calledaddDiffItemsandfilterDiffItems. - In your line of business, create a new method createPolicyLineDiffHelper that creates and returns an instance of your new difference helper subclass.
- Create a new difference
tree XML file that describes the structure of any new products. Remember
that PolicyCenter configures the XML files one for each product, not
one for each line of business. Even if a product had no lines of business,
you would need a new XML file. In practice, a new line of business is
one of the following items.
- Part of a new product, in which case you add a new XML file
- Part of an existing product, in which case you customize an existing XML file
- Because there are several reasons for calculating
differences, you can vary your application logic based on the difference
reason. The difference reason is a
DiffReasonenumeration passed to thePolicyPeriodDiffPluginplugin method compareBranches. Choices includeTC_INTEGRATION,TC_MULTIVERSIONJOB,TC_PREEMPTION,TC_POLICYREVIEW,TC_COMPAREJOBS. - You might want to also customize the PCBeanMatcher class, depending on what changes you made.
In your difference helper class method addDiffItems, create and add the DiffItem objects that you want to display in the multi-version difference screen. There are utility methods in the DiffUtils class for comparing, generating, and filtering difference items. Follow the pattern of the built-in lines of business and products for guidance.
You may have to manually add entities
not automatically recognized from the compare functions in DiffUtils, for instance Effective and Expiration date differences between
versions.
You can create DiffItems manually for these objects
by creating an instance of one of the following classes that are subclasses
of DiffItem. For instance,
DiffAdd, DiffRemove, and DiffSlice.
