Class SetCurrentLocation

  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.servlet.pipeline.PipelineableServletImpl
                  extended by atg.servlet.pipeline.InsertableServletImpl
                      extended by atg.projects.b2bstore.servlet.SetCurrentLocation
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, InsertableServlet, PipelineableServlet, java.util.EventListener, javax.servlet.Servlet
Direct Known Subclasses:

public class SetCurrentLocation
extends InsertableServletImpl

This servlet is inserted in request pipeline after DynamoServlet. This servlet checks the page accessed by the request and sets a location value in Profile.currentLocation property. A map containing page URLs or folders and values to be set is configured according to store rules. Based on the location property of Profile, corresponding location URL can be highlighted in Store. Location map can be configured in two ways.

Absolute path name of the page

ex: /Dynamo/solutions/Motorprise/en/home.jhtml
Whenever any request access this page then the value corresponding to this name in the map is updated in Profile.currentLocation

Any folder in document root.

ex: /Dyanmo/solutions/Motorprise/en/catalog/
if absolute file name of the request is not found in the map then folder of the file accessed is checked in the locationMap.
All the folder names are sorted in descending order so that the closest path of the file name requested is matched.

Profile.currentLocation is an enumerated property containing valid option values and codes. So all the values in locationMap has to exist in property definition of currentLocation.

See Also:

Field Summary
static java.lang.String CLASS_VERSION
static java.lang.String JHTML_EXTENSION
static java.lang.String JSP_EXTENSION
static java.lang.String SLASH_EXTENSION
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.util.Properties getLocationMap()
          Returns Location Map.
 java.lang.String getLocationProperty()
          Returns name of the location property
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Services a DynamoHttpServletRequest/Response pair
protected  void setLocation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method checks the path name of the file accessed against the locationMap and sets the value of path name in Profile
 void setLocationMap(java.util.Properties pLocationMap)
          Sets Location Map.
 void setLocationProperty(java.lang.String pLocationProperty)
          Sets name of the location property
protected  void setUserLocation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pLocation)
          This method sets the value passed in Profile.currentLocation property.
protected  void sortLocationMap()
          This method sorts the path names in locationMap in descending order and populates SortedNameList with these values.
Methods inherited from class atg.servlet.pipeline.InsertableServletImpl
doStartService, getInsertAfterServlet, setInsertAfterServlet
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
Methods inherited from class atg.nucleus.GenericService
addLogListener, doStopService, getAbsoluteName, 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
Methods inherited from interface atg.servlet.pipeline.PipelineableServlet
getNextServlet, passRequest, setNextServlet
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service

Field Detail


public static java.lang.String CLASS_VERSION


public static final java.lang.String JHTML_EXTENSION
See Also:
Constant Field Values


public static final java.lang.String JSP_EXTENSION
See Also:
Constant Field Values


public static final java.lang.String SLASH_EXTENSION
See Also:
Constant Field Values
Constructor Detail


public SetCurrentLocation()
Method Detail


public void setLocationProperty(java.lang.String pLocationProperty)
Sets name of the location property


public java.lang.String getLocationProperty()
Returns name of the location property


public void setLocationMap(java.util.Properties pLocationMap)
Sets Location Map.


public java.util.Properties getLocationMap()
Returns Location Map.


public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
Description copied from class: PipelineableServletImpl
Services a DynamoHttpServletRequest/Response pair

service in class PipelineableServletImpl
Throws: - if an error occurred while reading or writing the servlet request
javax.servlet.ServletException - if an error occurred while processing the servlet request


protected void setLocation(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
This method checks the path name of the file accessed against the locationMap and sets the value of path name in Profile

pRequest -
pResponse -


protected void setUserLocation(DynamoHttpServletRequest pRequest,
                               DynamoHttpServletResponse pResponse,
                               java.lang.String pLocation)
This method sets the value passed in Profile.currentLocation property.

pRequest -
pResponse -
pLocation - the location value to be set in profile.


protected void sortLocationMap()
This method sorts the path names in locationMap in descending order and populates SortedNameList with these values.