The core of the Assembler is the assemble() method, which takes a content item representing a cartridge instance configuration and invokes cartridge handlers to process it into a response content item.

The Assembler uses the visitor pattern to traverse the input content item and any child content items, and invokes the appropriate cartridge handler (if any) for each of them.

The Assembler makes two passes over the input content item:

The default implementation of the Assembler uses Spring to map each cartridge to the appropriate handler based on its content type. This content type corresponds to the template identifier that was used to create the content item object. If no cartridge handler is defined for a particular content type, the instance configuration is passed through as the response model.

For example, consider the following content item:

NestingDollContentItemSubclass nestingDoll

This content item represents a Russian Nesting Doll. It includes properties for its name, color, and its child content item: = "Nesting Doll"
nestingDoll.color = red
nestingDoll.child = secondNestingDoll

The secondNestingDoll contained within is green. It contains a thirdNestingDoll, which is blue. Assuming there is no cartridge handler for NestingDollContentItemSubclass, an assemble(nestingDoll) call executes the following:

What if you create a cartridge handler for NestingDollContentItemSubclass that doesn't override the initialize() or preprocess() methods, but implements logic to add a property colorType of value warm or cool, based on the color property? Steps 1-2 above don't change, but Step 3 invokes the new logic, and the property shows up in the response:

@type": "NestingDollTemplateType",
"name": "Nesting Doll",
"color": "red",
"colorType": "warm",
"child": [
      @type": "NestingDollTemplateType",
      "name": "Second Nesting Doll",
      "color": "green",
      "colorType": "cool",
      "child": [
          @type": "NestingDollTemplateType",
          "name": "Third Nesting Doll",
          "color": "blue",
          "colorType": "cool",

A content item is a set of key:value pairs where the key is a property name and the value may be any primitive type, or another content item. The com.endeca.infront.assembler ContentItem interface extends java.util.Map.

Content items in the Assembler represent either structural components of an application page, or GUI components on the page itself. A call to the Assembler.assemble(ContentItem) method accepts as input a ContentItem containing configuration, and returns a content item as output. The response content item can encompass an entire page in an application, with each sub-section of the page (such as the search box or the search results list) represented as its own nested content item.

The default Assembler implementation typically takes a ContentInclude or ContentSlotConfig object as input to the Assembler. The first specifies a content item by URI, while the second retrieves a content item from a specified folder according to template type and ID restrictions, trigger criteria, and content item priority.

Both methods retrieve the associated configuration for the content item in Workbench.

Unlike a ContentInclude object, which explicitly specifies a content item to pass as input to the Assembler, the ContentSlotConfig object defines a set of criteria for dynamically retrieving one or more content items at runtime. In most cases the content administrator creates and populates ContentSlotConfig objects through editors in Experience Manager, although you can still programatically instantiate them if necessary.

The dynamic content slot is populated based on the following restrictions:

When the list of possible content items has been narrowed down, the ContentSlotHandler issues a content trigger request. This checks valid content items against any triggers defined in Experience Manager. Trigger criteria can include:

The list of results is limited to triggered content items and ordered by the priority assigned to each content item in Experience Manager. The number of results is truncated to the value specified for the content slot (also specified on ContentSlotConfig). The Assembler then processes the content items and returns them in its response.

Content items may contain other content items, which can include both ContentInclude references and ContentSlotConfig definitions

For example, in Discover Electronics the /browse path corresponds to a page within the sitemap. The browse page consists of a content slot that references the Web folder. Most of the pages within the Web Browse Pages folder contain a mixture of static and dynamic content items. As the Assembler processes the query for (assuming no search terms or refinement selections), the following steps occur:

Copyright © Legal Notices