The /atg/endeca/assembler/cartridge/manager/DefaultActionPathProvider component, of class atg.endeca.assembler.navigation.DefaultActionPathProvider, calculates the site root path and the content path for follow-on links. For example, in the link below, the site root path is /pages and the content path is /browse, while the remainder of the URL represents the query parameters that define the request.

/pages/browse?N=4294967263

The combination of the site root path and the content path is called the action path.

To calculate the site root path and the content path, 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 site root and content path generation:

Calculating the Content Path

To calculate the content path for a navigation action, the DefaultActionPathProvider.getDefaultNavigationActionContentPath() method is invoked. This method 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 its defaultGuidedSearchNavigationActionPath property, which defaults to /guidedsearch.

To calculate the content path for navigation actions when Experience Manager is in use, the DefaultActionPathProvider component retrieves the value of the /atg/endeca/assembler/multisite/SiteState.contentPath property 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 it retrieved from the SiteState object. If it cannot resolve a content path from either the SiteState object 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 actions when Experience Manager is in use is very similar to that for navigation actions. The DefaultActionPathProvider component retrieves the value of the SiteState.contentPath property, however, it uses the recordActionUriMap property for the lookup instead. Also, if a content path cannot be resolved from either the SiteState object or the recordActionUriMap, this method returns the value specified in the DefaultActionPathProvider.defaultExperienceManagerRecordActionPath property, which defaults to /product.

Calculating the Site Root Path

To calculate the site root path for a navigation action, the DefaultActionPathProvider. getDefaultNavigationActionSiteRootPath() method uses a combination of the /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component and com.endeca.infront.content.source.ContentLocator objects. The WorkbenchContentSource component provides access to the ContentLocator objects, and the ContentLocator objects provide the site root path. Specifically, the DefaultActionPathProvider does the following:

The process for calculating the site root path for record actions is very similar to that for navigation actions. The getDefaultRecordActionSiteRootPath() method is invoked. This method performs similarly to the getDefaultNavigationActionSiteRootPath() method, 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 a ContentLocator object is the same; a call is made to the AssemblerTools.assemblerSettings() method to retrieve the default site root prefix.

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 site root and content path values 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 site root and content 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="/browse"/>
    <dsp:oparam name="output">

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

    </dsp:oparam>

  </dsp:droplet>

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