return requestData;
}
protected UrlParameterMapping handleUrlParameters(final HttpServletRequest request) {
UrlParameterMapping urlParameterMapping = new UrlParameterMapping();
String marketPlaceCode = null;
String marketCode = null;
String marketAreaCode = null;
String localizationCode = null;
String retailerCode = null;
String currencyCode = null;
String requestUri = request.getRequestURI();
requestUri = requestUri.replace(request.getContextPath(), "");
if (requestUri.startsWith("/")) {
requestUri = requestUri.substring(1, requestUri.length());
}
String[] uriSegments = requestUri.toString().split("/");
if (uriSegments.length > 4) {
marketPlaceCode = uriSegments[0];
marketCode = uriSegments[1];
marketAreaCode = uriSegments[2];
localizationCode = uriSegments[3];
retailerCode = uriSegments[4];
} else {
marketPlaceCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE);
marketCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_CODE);
marketAreaCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE);
localizationCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_LANGUAGE);
retailerCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_RETAILER_CODE);
currencyCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CURRENCY_CODE);
}
urlParameterMapping.setMarketPlaceCode(marketPlaceCode);
urlParameterMapping.setMarketCode(marketCode);
urlParameterMapping.setMarketAreaCode(marketAreaCode);
urlParameterMapping.setLocalizationCode(localizationCode);
urlParameterMapping.setRetailerCode(retailerCode);
urlParameterMapping.setCurrencyCode(currencyCode);
return urlParameterMapping;
}