Note: The cartridge handlers for the targeting cartridges are built using the Oracle ATG Web Commerce actor framework that assembles chains of actors to accomplish tasks. This section describes the handlers themselves. For more information on actors and actor chains, see the ATG Web Services Guide.

The cartridge handler components for the targeting cartridges are all instances of the atg.projects.store.assembler.cartridge.handler.ActorInvokingCartridgeHandler class. The ActorInvokingCartridgeHandler class is a helper class that does the following:

Four cartridge handler components exist for the targeting cartridges:

These handler components specify the following properties so that their instances of the ActorInvokingCartridgeHandler class can call an actor to retrieve the correctly targeted content:

The HomepageTargetedItemsActor extracts the properties from the augmented content item and creates a set of input parameters from them. As part of this process, the HomepageTargetedItemsActor determines if the componentPath provided by Experience Manager is a complete path and, if not, it prepends the componentPath with the value in pathPrefix. After a complete path is determined, the HomepageTargetedItemsActor resolves the ATG slot or targeter component and calls the /atg/endeca/assembler/cartridge/actor/TargetedItemsActor to retrieve the number of items specified in the itemCount property from the appropriate ATG repository (if no itemCount property is supplied, all of an ATG slot or targeter’s items are returned).

Note: This architecture of having one actor compute a set of input parameters and then pass them to another actor that executes the targeter allows Commerce Reference Store to have a single, generic actor that can execute targeters against any repository.

The TargetedItemsActor validates the items it retrieves, first by calling the /atg/store/droplet/ItemValidatorDroplet servlet bean for each targeted item and then by making sure each item’s repository ID matches the repository specified in the contentItemAdditionsMap. The ItemValidatorDroplet servlet bean applies the CollectionObjectValidator components listed in its validators property to the repository item to determine whether to include it in the returned content. By default, the validators property is set to the /atg/store/collections/validator/StartEndDateValidator component.

For product items, the TargetedItemsActor also adds pricing, site ID, and currency code information to the content that is returned. The TargetedItemsActor then returns the retrieved items to the HomepageTargetedItemsActor. The HomepageTargetedItemsActor stores the retrieved items in the "contentItem['atg:contents']items" property and returns the content item to the Assembler.

Because the cartridge names do not identically match the cartridge handler names, the /atg/endeca/assembler/NucleusAssemblerFactory.handlerMapping property includes the following mappings to associate each targeting cartridge with the correct handler component:

PromotionalContent-ATGSlot=\
     /atg/endeca/assembler/cartridge/handler/PromotionalContentSlot,\
PromotionalContent-ATGTargeter=\
     /atg/endeca/assembler/cartridge/handler/PromotionalContentTargeter,\
ProductSpotlight-ATGSlot=\
     /atg/endeca/assembler/cartridge/handler/ProductSpotlightSlot,\
ProductSpotlight-ATGTargeter=\
     /atg/endeca/assembler/cartridge/handler/ProductSpotlightTargeter,\

All four components specify the same repository for targeting, specifically, the catalog repository specified by the /atg/commerce/catalog/CatalogTools.catalog property. Each component has its own value for the itemDescriptor property and for the pathPrefix value included in the contentItemAdditionsMap property. These values are shown in the table below:

Component

itemDescriptor

pathPrefix

PromotionalContentSlot

promotionalContent

/atg/registry/SlotRegistry.componentRootPath

PromotionalContentTargeter

promotionalContent

/atg/registry/TargeterRegistry.componentRootPath

ProductSpotlightSlot

product

atg/registry/SlotRegistry.componentRootPath

ProductSpotlightTargeter

product

/atg/registry/TargeterRegistry.componentRootPath


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices