Class NavHistoryCollector

  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.repository.servlet.NavHistoryCollector
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class NavHistoryCollector
extends DynamoServlet

This droplet is what you would use to throw down a trail of breadcrumbs that will show the user the way that he has navigated your site to arrive at the page he is on. On each page on which you would like him to throw down a breadcrumb, just invoke this servlet with the item to use as a breadcrumb and the action to perform on the breadcrumb stack.

We will keep track of the path that the user has traversed from the top of the site to the current location. We will keep a stack of locations visited and move items on and off that stack as needed to keep the list a concise path from user's current position to the "top" of the site. There are 4 ways that a user can move:

  1. When the user navigates in the forward direction or down the hierarchy, we push another item on the stack.
  2. When he navigates up the hierarchy by clicking on breadcrumb or another navigational item, we will pop the appropriate number of items off the stack.
  3. If the user hits the back button one or more times and then resumes navigation we are able to recognize that and reset the navigation path, so that we will add breadcrumbs from the position at which navigation was resumed rather than the farthest point the user reached.
  4. Finally, if the user jumps to an unrelated area of the site, as if by a global navigation or some other link, we can jump to that area. If there is a default navigation path to the page jumped to, as in a hierarchical structure, that will be filled in. However, to have anything filled in you must extend this class and implement the getDefaultHistory() method as appropriate to your repository structure.

    The following input parameters may be passed to NavHistoryCollector:

    navAction (optional)
    Set this to the action you would like to take. Choices are "push", "pop", and "jump". An unset navAction will be treated as "push".
    navCount (requred)
    This parameter is used to detect when the back button has been used. We compare the value of this parameter to the value stored with the breadcrumb stack. If the backbutton is used, then we will reset the breadcrumb stack.
    item (either this or itemName must be specified)
    This is the item to add to the breadcrumb stack.
    itemName (may be used in place of item)
    The name of the current page that will be used as anchor text in a link back to the current page when it appears in the breadcrumbs.

    NavHistoryCollector has no output parameters.

    See Also:

    Field Summary
    static java.lang.String CLASS_VERSION
              Class version string
    static ParameterName ITEM
    static ParameterName ITEM_NAME
    protected  ComponentName mNavHistoryPath
    static ParameterName NAV_ACTION
    static ParameterName NAV_COUNT
    Fields inherited from class atg.servlet.DynamoServlet
    mAllowCleanupRequest, mParameters
    Fields inherited from class atg.nucleus.servlet.ServletService
    Fields inherited from class atg.nucleus.GenericService
    Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
    Fields inherited from interface atg.nucleus.logging.ApplicationLogging
    Constructor Summary
    Method Summary
     java.lang.String getNavHistoryPath()
              Returns property NavHistoryPath
     void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
              Look for the RepositoryItem and if found render the output oparam by binding the item as a parameter.
     void setNavHistoryPath(java.lang.String pNavHistoryPath)
              Sets property NavHistoryPath
    Methods inherited from class atg.servlet.DynamoServlet
    doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
    Methods inherited from class atg.nucleus.servlet.ServletService
    destroy, getServletConfig, getServletInfo, init, setServletInfo
    Methods inherited from class atg.nucleus.TimedOperationService
    getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
    Methods inherited from class atg.nucleus.GenericService
    addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
    Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
    vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Field Detail


    public static java.lang.String CLASS_VERSION
    Class version string


    public static final ParameterName NAV_ACTION


    public static final ParameterName NAV_COUNT


    public static final ParameterName ITEM_NAME


    public static final ParameterName ITEM


    protected ComponentName mNavHistoryPath
    Constructor Detail


    public NavHistoryCollector()
    Method Detail


    public void setNavHistoryPath(java.lang.String pNavHistoryPath)
    Sets property NavHistoryPath


    public java.lang.String getNavHistoryPath()
    Returns property NavHistoryPath


    public void service(DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws javax.servlet.ServletException,
    Look for the RepositoryItem and if found render the output oparam by binding the item as a parameter. If no item can be found render the empty oparam.

    service in class DynamoServlet
    pRequest - the request to be processed
    pResponse - the response object for this request
    javax.servlet.ServletException - an application specific error occurred processing this request - an error occurred reading data from the request or writing data to the response.