Creating a new value provider

If none of the default value providers is appropriate, you can configure a new custom value provider.

You create new value providers by extending the RateTableCellValueProvider abstract class. Create new value providers in the gw.rating.rtm.valueprovider package. The user interface has the following restriction: the package is hard-coded and does not display in the rate table definition user interface.

Performance considerations have to be taken into account when creating new value providers. Values may be retrieved from value providers multiple times when the Rate Table Editor screen loads. Therefore, caching responses that the value provider gets from certain sources may improve performance of the user interface. For an example of caching in value providers, see any of the product model value providers.

For the new value provider to appear in the list of custom value providers in the Rate Table Definition Editor, you must add a new typecode to the ValueProvider typelist. The Code of the added typecode must be the same as the name of the value provider Gosu class.