|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.servlet.pipeline.PipelineableServletImpl atg.servlet.pipeline.InsertableServletImpl atg.projects.b2bstore.servlet.SetCurrentLocation
public class SetCurrentLocation
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.
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
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
.
WASetCurrentLocation
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 |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SetCurrentLocation()
|
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.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
public static final java.lang.String JSP_EXTENSION
public static final java.lang.String SLASH_EXTENSION
Constructor Detail |
---|
public SetCurrentLocation()
Method Detail |
---|
public void setLocationProperty(java.lang.String pLocationProperty)
public java.lang.String getLocationProperty()
public void setLocationMap(java.util.Properties pLocationMap)
public java.util.Properties getLocationMap()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
PipelineableServletImpl
service
in class PipelineableServletImpl
java.io.IOException
- if an error occurred while reading or writing
the servlet request
javax.servlet.ServletException
- if an error occurred while processing
the servlet requestprotected void setLocation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- protected void setUserLocation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pLocation)
Profile.currentLocation
property.
pRequest
- pResponse
- pLocation
- the location value to be set in profile.protected void sortLocationMap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |