Code example for ServletWebRequest

0
    /** 
     * Responsible for returning the currency to use for the current request. 
     */ 
    @Override 
    public BroadleafCurrency resolveCurrency(HttpServletRequest request) { 
        return resolveCurrency(new ServletWebRequest(request)); 
    } 
 
    @Override 
    public BroadleafCurrency resolveCurrency(WebRequest request) { 
        BroadleafCurrency currency = null; 
 
        // 1) Check request for currency 
        currency = (BroadleafCurrency) request.getAttribute(CURRENCY_VAR, WebRequest.SCOPE_REQUEST); 
 
        // 2) Check for a request parameter 
        if (currency == null && BLCRequestUtils.getURLorHeaderParameter(request, CURRENCY_CODE_PARAM) != null) { 
            String currencyCode = BLCRequestUtils.getURLorHeaderParameter(request, CURRENCY_CODE_PARAM); 
            currency = broadleafCurrencyService.findCurrencyByCode(currencyCode); 
            if (LOG.isTraceEnabled()) { 
Connect your IDE to all the code out there  Get Codota for Java