Cartridges are made up of several components that may be customized for specific purposes.

The following diagram shows the parts of a cartridge and where they fit within the overall architecture:

The cartridge template defines the configuration options that are available to the business user in Workbench. The Experience Manager interface is composed of editors that provide UI controls for specifying property values. Experience Manager produces the cartridge instance configuration that is consumed by the Assembler. During the processing of a query, the Assembler may invoke cartridge handlers that define specific processing logic for particular cartridges. Using these cartridge handlers, the Assembler produces the response object that it returns to the client application. Typically, the client application includes modular renderers that are intended to handle a particular cartridge.

We created a basic template and renderer in the example cartridge. We also inspected the cartridge instance configuration generated in Workbench and the response returned by the Assembler. In the example cartridge, both the configuration and the response model were generic content items that are simple maps of properties. Many of the core cartridges have strongly typed configuration models and response objects associated with them that extend from the basic content item. This makes it easier to understand the expected input to and output from the core cartridge handlers, and also enables reuse of the models for the core cartridges. Strongly typed configuration beans also make it possible to configure default values for cartridge properties via Spring. Creating strongly typed model objects for the Assembler configuration and response is not required when developing cartridges.

In the following sections, we discuss how to customize the Experience Manager interface using editors, and how to define custom processing logic in the Assembler using cartridge handlers.


Copyright © Legal Notices