8 Externalized Objects Management Issues

This chapter provides release notes on externalized objects management issues. It contains the following topics:

8.1 Improvement to Dynamic Choices Definition

RTD 3.2 introduces a new function which may be configured against a dynamic choice group, indicated in the following screenshot:

Surrounding text describes func_return.gif.

The function is optional. If provided, it must take two String parameters, Choice ID and Choice Group in that order, and return an entity object.

The new function has been introduced as part of fixing <Choice Group>.getChoice() for dynamic choices. If the new function is not provided, then getChoice() will (a) call the function configured against the list of entities on the Group Attributes tab (b) iterate through all entities to find the matching one. This iteration may be sup-optimal, especially when there is a large number of dynamic choices, hence the possibility for the ILS developer to supply the new function which may be more performant. If the new function is provided, it will be used in preference and should return the entity corresponding to the specified dynamic Choice ID. The Choice Group parameter may help the ILS developer improve the function's performance.

DC_Demo has been extended to include an example implementation of the new dynamic choice function. The changes made are:

  • Caching enabled for the Web Offers List entity:

    Surrounding text describes web_offers_list_entity.gif.
  • A Map attribute added to the Web Offers List attribute, populated on first access after a cache refresh, which provides an efficient way to look up an offer given its ID.

    Surrounding text describes map_attribute_added.gif.

    A new function supplies the map on first access:

    Surrounding text describes new_function.gif.
  • A function to return the entity given a Choice ID is provided and configured against the dynamic choice group:

    Surrounding text describes return_the_entity.gif.