The behavior of the navigation cartridges depends on multiple sources of configuration. The data from these source is combined into a configuration model within the initialize() method of each associated cartridge handler in the Assembler.

Navigation cartridge configuration falls into the following categories, in ascending order of priority:

Additionally, while it is not represented in the cartridge configuration model, configuration in the MDEX Engine impacts the behavior of the navigation cartridges.

Request-based configuration overrides the cartridge instance configuration, which overrides the cartridge-level defaults, which override default feature behavior configured in the MDEX Engine.

The core cartridges typically consist of a strongly typed configuration model, a response model, and a cartridge handler that processes the configuration model into the response model. By convention, they are named as follows:

For details about the implementations of these classes for specific cartridges, refer to the Assembler API Reference (Javadoc).

You can specify default configuration settings for the navigation cartridges in the reference implementation by adding values to the cartridge handler configuration in the Spring context file.

Cartridge handler configuration (including default configuration values) is specified as part of the Spring context file for the Assembler. In the Discover Electronics application, this is defined in WEB-INF/assembler-context.xml.

You specify the cartridge handler for a specific cartridge by defining a bean whose ID follows the format CartridgeHandler_<CartridgeType>, where the <CartridgeType> is the id of the corresponding cartridge template. For example, the cartridge handler for the Breadcrumbs cartridge is defined in the CartridgeHandler_Breadcrumbs bean. You can map more than one cartridge to the same cartridge handler.

Typically, you specify the default configuration for a cartridge by defining a contentItemInitializer property within the cartridge handler. The value of this property is a bean whose class implements the ContentItemInitializer interface. The core cartridges use the ConfigInitializer class, which provides a default implementation for merging the default, instance, and request-based configuration for a cartridge. Within the contentItemInitializer bean, the defaults property (if defined) must be a bean whose class is a ContentItem representing the cartridge configuration model to use as a default.

For information about the properties available in the configuration model for the core cartridges, refer to the Assembler API Reference (Javadoc) for the relevant configuration model class.


Copyright © Legal Notices