Similar to HTTP requests, requests that are made to the Assembler use the paradigm of a request object and a response object. Both of these objects are of type com.endeca.infront.assembler.ContentItem. There are two subclasses of ContentItem, depending on the type of content being requested: com.endeca.infront.cartridge.ContentInclude and com.endeca.infront.cartridge.ContentSlotConfig.

ContentInclude is used to request pages defined in the Pages section of Experience Manager. Invoking the Assembler for a page request is also referred to as “invoking the Assembler with a ContentInclude.” The URI for a page request must begin with a /pages prefix, for example, /pages/browse. Endeca uses the /pages prefix to distinguish page requests from content collection requests.

The handler for the ContentInclude component first tries to retrieve the content at the exact URI specified in the ContentInclude. If there is no content at that location, the handler attempts to find the deepest matching path. To return to our original example, assume a browse page exists in the Experience Manager Pages definitions. Passing in a /pages/browse path will match this browse page. Passing in a /pages/browse/seo/url path will also match this page because the deepest matching path the handler can find for /pages/browse/seo/url is /pages/browse (this example assumes that a browse/seo/url page does not exist in Experience Manager).

ContentSlotConfig is used to request content collections defined in the Content section of Experience Manager. Invoking the Assembler for a content collection request is also referred to as “invoking the Assembler with a ContentSlot item.” A content collection request must specify the name of the content collection and the number of items to retrieve from that collection. The handler for ContentSlotConfig, uses these parameters to form a content trigger request that fetches the top item (or items) from the collection by priority. The Assembler then processes the content items from the collection and returns them as part of the response for rendering.

The remainder of this chapter makes a distinction between ContentInclude and ContentSlotConfig when necessary. When the distinction is not required, the more general ContentItem is used.

Note: For more information on the ContentInclude and ContentSlotConfig components and their handlers, refer to the Assembler Application Developer’s Guide in the Oracle Endeca Commerce documentation.

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices