Content Assembler API 2.1.2

Content Assembler API 2.1.2

 

See:
          Description

Packages
com.endeca.content Contains the core Content Assembler API.
com.endeca.content.assembler Contains the core Content Assembler implementation.
com.endeca.content.ene A Navigation API implementation of the core Content Assembler API.

 

 


Content Assembler API Overview and Usage Guide

Contents

This overview contains the following sections:

See Also:
Class Model Diagram

Creating a ContentManager

 // Create a globally scoped ContentManager.
 ContentManager contentManager = null;
 final ServletContext servletContext = getServletContext();
 synchronized(servletContext) {
   ContentManager contentManager = (ContentManager)servletContext.getAttribute("contentManager");
   if(null == contentManager) {
     // Create an ENEContentManager.
     contentManager = new ENEContentManager();
     servletContext.setAttribute("contentManager", contentManager);
   }
 }
See Also:
ContentManager
ENEContentManager

Creating a ContentQuery

 // Create an ENEContentQuery.
 final ENEContentQuery query = (ENEContentQuery)contentManager.createQuery();

 // Populate the query.
 query.setENEQuery(new UrlENEQuery(request.getQueryString(), encoding));
 query.setENEConnection(new HttpENEConnection(eneHost, enePort));
 query.setRuleZone("NavigationPageZone");
See Also:
ContentManager.createQuery()
ENEContentQuery

Executing a ContentQuery

 // Execute the query.
 final ENEContentResults results = (ENEContentResults)query.execute();

 // Get the root content item.
 final ContentItem content = results.getContent();

 // Get the ENEQueryResults.
 final ENEQueryResults eneQueryResults = results.getENEQueryResults();
See Also:
ContentQuery.execute()
ContentResults
ContentItem
ENEContentResults.getENEQueryResults()


Content Assembler API 2.1.2

Copyright © 2012 Endeca Technologies, Inc. All Rights Reserved.
@VERSION
PRODUCT: Content Assembler API (ContentAssemblerAPIJava)
VERSION: 2.1.2
BUILD:   54DEV
ARCH_OS: n/a
DATE:    2012-02-16T20:28:44-0500