Returns a request parameter as float.
@param request Request.
@param param Parameter name.
@return Parameter value or 0 if it does not exist or is not a number.
188616
public static float getFloat(@NotNull ServletRequest request, @NotNull String param) {
    return getFloat(request, param, 0f);
  }
432929
@Override
    public <T> T getParameterValue(Parameter<T> arg0)
    {

        return query.getParameterValue(arg0);
    }
166327
public static String getParameter(final Request request, final String parameterName)
	{
		String parameterValue = request.getRequestParameters().getParameterValue(parameterName)
			.toString();
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getPostParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getQueryParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getRequestParameters().getParameterValue(parameterName)
				.toString();
		}
		return parameterValue;
	}
192530
public static String[] getRequestParameterValues(final HttpServletRequest request, final String key) {
		return getRequestParameters(request).get(key);
	}
325516
private void addPostParams(final Request request) {
        if (to != null) {
            request.addPostParam("To", to);
        }

        if (channel != null) {
            request.addPostParam("Channel", channel);
        }

        if (customMessage != null) {
            request.addPostParam("CustomMessage", customMessage);
        }

        if (sendDigits != null) {
            request.addPostParam("SendDigits", sendDigits);
        }

        if (locale != null) {
            request.addPostParam("Locale", locale);
        }

        if (customCode != null) {
            request.addPostParam("CustomCode", customCode);
        }

        if (amount != null) {
            request.addPostParam("Amount", amount);
        }

        if (payee != null) {
            request.addPostParam("Payee", payee);
        }
    }
406727
private Map<String, String> getQueryParams(Request request) {
        final Map<String, String> queryParams = new HashMap<>();
        request.queryMap().toMap().forEach((k, v) -> {
            queryParams.put(k, v[0]);
        });
        return queryParams;
    }
1281464
public static String[] getQueryParameterValues(RESTRequest request, String name) {
        if (!"post".equalsIgnoreCase(request.getMethod())) {
            return request.getParameterValues(name);
        }

        if (request.getQueryString() == null) {
            return null;
        }

        Hashtable params = null;
        try {
            params = RequestUtils.parseQueryString(request.getQueryString());
        } catch (Exception e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event("DefaultRoutingHelper", tc, "Failed to parse the query string:\n Exception: " + e);
            }
            return null;
        }

        return (String[]) params.get(name);
    }
955579
private void addPostParams(final Request request) {
        if (url != null) {
            request.addPostParam("Url", url.toString());
        }

        if (method != null) {
            request.addPostParam("Method", method.toString());
        }
    }
1315365
public String getParameter( String name )
    {
        if (_parameters == null || !_parameters.hasParameters())
            return null;

        List parameters = _parameters.getParameterValues(name);
        if(parameters != null && parameters.size() > 0)
            return (String)parameters.get(0);
        else return null;
    }
642158
@Override
    public void setFloat(int parameterIndex, float x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = (double) x;
    }
484418
private void addPostParams(final Request request) {
        if (url != null) {
            request.addPostParam("Url", url.toString());
        }

        if (method != null) {
            request.addPostParam("Method", method.toString());
        }

        if (status != null) {
            request.addPostParam("Status", status.toString());
        }

        if (fallbackUrl != null) {
            request.addPostParam("FallbackUrl", fallbackUrl.toString());
        }

        if (fallbackMethod != null) {
            request.addPostParam("FallbackMethod", fallbackMethod.toString());
        }

        if (statusCallback != null) {
            request.addPostParam("StatusCallback", statusCallback.toString());
        }

        if (statusCallbackMethod != null) {
            request.addPostParam("StatusCallbackMethod", statusCallbackMethod.toString());
        }
    }
880788
public static String getString(HttpServletRequest request, String parameterName, String defaultValue) {
		String value = request.getParameter(parameterName);
		if (value == null || value.length() == 0) {
			return defaultValue;
		}
		else {
			return value;
		}
		// return StringUtils.isEmpty(value) ? defaultValue : value;
	}
343876
public double getDouble(String name)
    {
        double val = 0;
        try {
            val = Double.valueOf(request.getParameter(name));
        } catch (NumberFormatException e) {}
        
        return val;
    }
169016
public static String getParam(HttpServletRequest req, String strParam)
    {
        return BaseHttpTask.getParam(req, strParam, Constants.BLANK);
    }
964500
public static int getIntParam(JSONObject params, String paramName) throws ApiException {
		if (!params.containsKey(paramName)) {
			throw new ApiException(ApiException.Type.MISSING_PARAMETER, paramName);
		}

		try {
			return params.getInt(paramName);
		} catch (JSONException e) {
			throw new ApiException(ApiException.Type.ILLEGAL_PARAMETER, paramName, e);
		}
	}
923144
public static BigDecimal getBigDecimalParameter(final HttpServletRequest request, final String name) {
		String value = request.getParameter(name);
		if (StringUtils.isBlank(value)) {
			return null;
		}
		return new BigDecimal(value);
	}
659230
private void addPostParams(final Request request) {
        if (to != null) {
            request.addPostParam("To", to.toString());
        }

        if (from != null) {
            request.addPostParam("From", from.toString());
        }

        if (parameters != null) {
            request.addPostParam("Parameters", Converter.mapToJson(parameters));
        }
    }