The /atg/endeca/assembler/cartridge/manager/DefaultActionPathProvider component, of class atg.endeca.assembler.navigation.DefaultActionPathProvider, creates the action path portion of the action strings that are stored in ContentItem objects. The action path is defined as the combination of the site root path and the content path. For example, in the link below:

/pages/browse?N=4294967263

The site root path is /pages and the content path is /browse (the remainder of the URL represents the query parameters that define the request). The DefaultActionPathProvider class generates both the site root and the content path values to be used in the action string. To do so, the DefaultActionPathProvider class implements the com.endeca.infront.navigation.url.ActionPathProvider interface and its four methods:

The DefaultActionPathProvider component also has the following properties that support action path generation:

Calculating the Content Path

To calculate the content path for a navigation request, the getDefaultnavigationActionContentPath() method is invoked. This method, in turn, calls the AssemblerTools.isExperienceManager() method to determine if Experience Manager is in use. If so, the DefaultActionPathProvider component calculates the content path to return using the process described in the next paragraph. If Experience Manager is not in use, the DefaultActionPathProvider component returns the value of the defaultGuidedSearchNavigationActionPath property, which defaults to /guidedsearch.

To calculate the content path to use for navigation requests when Experience Manager is in use, the DefaultActionPathProvider component checks the current request to determine if it contains an Endeca-specific URL. If it does, the DefaultActionPathProvider component extracts the entire action path from the URL and looks for a match in the keys of its navigationActionUriMap property. If a match is found, the DefaultActionPathProvider component returns the content path portion of the matching entry’s value. If no match is found, the DefaultActionPathProvider component returns the content path portion from the current request’s action path. If it cannot resolve a content path from either the current request or the navigationActionUriMap, the DefaultActionPathProvider component returns the value specified in its defaultExperienceManagerNavigationActionPath property, which defaults to /browse.

The process for calculating the content path for record requests when Experience Manager is in use is very similar to that for navigation requests. The getDefaultRecordActionContentPath() method is invoked and it performs the same URL checking, extraction, and comparison process, however, it uses the recordActionUriMap property for the lookup instead. Also, if a content path cannot be resolved from either the current request or the navigationActionUriMap, this method returns the value specified in the DefaultActionPathProvider.defaultExperienceManagerNavigationActionPath property, which defaults to /product.

Calculating the Site Root Path

To calculate the site root path for a navigation request, the getDefaultNavigationActionSiteRootPath() method is invoked. First, this method checks the current request to determine if it contains an Endeca-specific URL. If it does, the DefaultActionPathProvider component extracts the entire action path from the URL and looks for a match in the keys of its navigationActionUriMap property. If a match is found, the DefaultActionPathProvider component returns the site root portion of the matching entry’s value. If no match is found, the DefaultActionPathProvider component returns the site root portion from the current request’s action path.

If it cannot resolve a content path from either the current request or the navigationActionUriMap, the DefaultActionPathProvider component calls the AssemblerTools.isExperienceManager() method to determine if Experience Manager is in use. If so, the DefaultActionPathProvider component invokes the AssemblerTools.assemblerSettings() method to retrieve the default site root prefix. This prefix is dependent on whether or not Experience Manager or Guided Search is installed and defaults to /pages and /service, respectively.

The process for calculating the site root path for record requests is very similar to that for navigation requests. The getDefaultRecordActionSiteRootPath() method is invoked. This method performs the same URL checking, extraction and comparison process, however, it uses the recordActionUriMap property for the lookup instead. The process for retrieving a default site root in cases where one cannot be resolved from either the current request or the recordActionUriMap is the same; a call is made to the AssemblerTools.assemblerSettings() method to retrieve the default site root prefix.

Also, if the DefaultActionPathProvider component cannot resolve a content path from either the current request or the navigationActionUriMap, it returns the value specified in its defaultExperienceManagerNavigationActionPath property, which defaults to /product.

DefaultActionPathProvider and the InvokeAssembler Servlet Bean

When using the /atg/endeca/assembler/droplet/InvokeAssembler servlet bean to retrieve content from the Assembler, there is no concept of a “current request.” Because the DefaultActionPathProvider logic uses the current request’s action path to do its calculations, the InvokeAssembler servlet bean provides navActionContentPath and recordActionContentPath parameters for passing in a value that can function as the current request’s action path. These parameters are used for navigation requests and record requests, respectively. The code sample below shows the use of the navActionContentPath.

<dsp:droplet name="InvokeAssembler">

    <dsp:param name="contentCollection" value="/content/Shared/Guided Navigation"/>
    <dsp:param name="navActionContentPath" value="/pages/mobile/browse"/>
    <dsp:oparam name="output">

      <dsp:getvalueof var="contentItem"
                      vartype="com.endeca.infront.assembler.ContentItem"
                      param="contentItem" />

    </dsp:oparam>

  </dsp:droplet>

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