A simple implementation of the ItemFilter and ItemHistory interfaces is provided in the atg.service.filter.TopicHistoryConflictFilter class, which maintains a historical record of all items that have been allowed through it so far. On invocation of its filterItems method, it filters out any items that conflict either with other items in the same result set, or with any items that have been allowed through the filter on previous invocations.

Typically this object will be a session or request-scoped Nucleus component. If session-scoped, it provides conflict resolution over the course of the session; if request-scoped, it provides conflict resolution within the serving of a single page.

The algorithm used to resolve conflicts is as follows: each item is analyzed by looking at a set of specific DynamicBeans properties, whose names are supplied by the conflict filter configuration. The analysis determines these attributes for each item:

Two items are considered to be in conflict if their conflict topics are the same, but their conflict tags differ. Thus, Cogswell Cogs and Spacely Sprockets promotions in the above examples would be considered in conflict with each other. On the other hand, a soft drink promotion would not conflict with an auto parts promotion, despite their conflict tags being different, because their conflict topics are not the same.

If two conflicting items belong to a single targeting result set being filtered, and conflict priorities can be determined, then the item with the greater priority wins. If conflict priorities cannot be determined, then a random choice is made.

If two items conflict and one item has already been recorded in the filter’s history as having passed the filter, then the other item is rejected.

The configurable properties of a TopicHistoryConflictFilter are as follows:

Different conflict filters may be deployed in different servlet beans on the same site, if desired, to provide conflict resolution services that are customized for particular purposes.

The Personalization module includes a /atg/targeting/ConflictFilter component that is a session-scoped conflict filter of type TopicHistoryConflictFilter pre-configured to use the item property names conflictTopic and conflictTag.

loading table of contents...