The Assembler implementation included with Tools and Frameworks is configured through Spring. The configuration in the Spring context file applies to both the in-process Assembler and the Assembler Service.

This guide assumes an application based around the included Assembler implementations. You can provide your own implementation if you need to use an alternate means of configuring the Assembler.

In the reference implementations, application-specific Assembler configuration is specified in the Spring context file located in WEB-INF\assembler-context.xml.

A cartridge handler is an Assembler component that takes the configuration model for a specific cartridge and interacts with an external system to produce a response model. Cartridge handler configuration is a subset of Assembler configuration.

The Assembler provides several utilities for parsing incoming requests and forming MDEX Engine queries.

The navigation state builder is responsible for parsing the request URL into a NavigationState object and for generating URLs based on a NavigationState.

Navigation state builder property

Description

urlFormatter

Specifies the UrlFormatter object to use for parsing the request URL into a NavigationState object and for generating URLs based on a NavigationState.

Note

In the Discover Electronics application, this bean is configured in endeca-url-config.xml.

mdexRequestBuilder

The MdexRequestBuilder implementation to use for forming MDEX Engine requests. For more information, see "About configuring cartridge handlers that make search and navigation queries."

contentPathProvider

Specifies the ContentPathProvider implementation that provides the URL path info for a navigation query or a record query. A reference implementation, BasicContentPathProvider, is included as part of Discover Electronics. As configured in the example below, it returns /browse for navigation queries and /detail for record detail queries.

defaultSearchKey

The name of a property, dimension, or search interface against which searches (using the Search Box cartridge) are performed.

defaultMatchMode

The match mode to use for text searches. Valid values for this property follow the syntax of URL parameters for search mode, without the mode+match prefix.

siteState

Identifies the current site using the siteStateBuilder configuration.

siteManager

Reference to the siteManager component, which is used by NavigationStateBuilder to look up the site definition for the currently active site.

removeAlways

removeOnUpdateFilterState

removeOnClearFilterState

These properties configure which URL parameters from the request URL are preserved when generating action strings and which ones are removed, depending on the type of transition the action URL represents.

recordDetailsDimensionNames

A list of dimensions whose dimension values should be applied to the navigation state for a record query based on the values that are tagged on that record. This navigation state can be used for triggering configuration for the associated record detail page or for a spotlight cartridge that has the "restrict to refinement state" option enabled.

Cartridge handlers that need to make MDEX Engine queries can reference the navigation state, record state, site state, user state, and MDEX request builder beans configured in the cartridge support section of the Spring context file.

The navigation state and record state represent the query parameters for each type of MDEX Engine query. The MDEX request builder consolidates requests from all the cartridge handlers in a single Assembler processing cycle into as few MDEX queries as possible. These beans are defined in terms of previously configured beans; their configuration should not need to vary between applications.

The NavigationCartridgeHandler references the navigationState, mdexRequestBuilder and siteState beans for making navigation queries. The RecordDetailsHandler references the recordState for record detail queries. Cartridge handlers (including many of the core cartridges) that need access to the navigation state, record state, site state or the MDEX request builder typically extend one of these handlers. Note that RecordDetailsHandler itself extends NavigationCartridgeHandler as shown below, thereby inheriting the references to the navigation state and MDEX request builder specified in the NavigationCartridgeHandler bean.

<bean id="NavigationCartridgeHandler" abstract="true">
    <property name="navigationState" ref="navigationState" />
    <property name="mdexRequestBuilder" ref="mdexRequestBuilder" />
				<property name="mdexRequestBuilder" ref="mdexRequestBuilder" />
				<property name="actionPathProvider" ref="actionPathProvider"/>
    <property name="siteState" ref="siteState"/>
				<property name="userState" ref="${user.state.ref}"/>
</bean>

<bean id="CartridgeHandler_RecordDetails" 
  class="com.endeca.infront.cartridge.RecordDetailsHandler"
  parent="NavigationCartridgeHandler" scope="prototype" >
    <property name="recordState" ref="recordState" />
</bean>

Copyright © Legal Notices