Returns a request parameter as long.
@param request Request.
@param param Parameter name.
@param defaultValue Default value.
@return Parameter value or default value if it does not exist or is not a number.
511179
public static long getLong(@NotNull ServletRequest request, @NotNull String param, long defaultValue) {
    String value = request.getParameter(param);
    return NumberUtils.toLong(value, defaultValue);
  }
284573
private static long __parseLong(String strLong, long defaultValue) {
        try {
            return Long.parseLong(strLong);
        } catch (NumberFormatException ex) {
            return defaultValue;
        }
    }
1238006
public static long longVal(String val, long defaultValue) {
        try {
            return NumberUtils.createNumber(val).longValue();
        } catch (Exception e) {
            log.warn("longVal(String, int) throw {}, return defaultValue = {}", e, defaultValue);
            return defaultValue;
        }
    }
1284473
public String get(String key, String defaultValue) {
        String value = parameters.get(key);
        return StringUtils.isBlank(value) ? defaultValue : value;
    }
989811
public Integer getParaToInt(String name, Integer defaultValue) {
		return toInt(request.getParameter(name), defaultValue);
	}
466370
public static Long getLong(String propertyName, String envName, Long defaultValue) {
		checkEnvName(envName);
		Long propertyValue = NumberUtil.toLongObject(System.getProperty(propertyName), null);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = NumberUtil.toLongObject(System.getenv(envName), null);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}
692723
public static Long parseLong(String param) {
		try {
			if (!StringUtils.isBlank(param)) {
				return Long.valueOf(param);
			}
		} catch (Exception e) {
			throw new IllegalArgumentException("Parameter " + param + " is not a number.");
		}
		return null;
	}
1021446
public static double getDouble(@NotNull ServletRequest request, @NotNull String param, double defaultValue) {
    String value = request.getParameter(param);
    return NumberUtils.toDouble(value, defaultValue);
  }
905336
public Long getParameterTime(String name, Long defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         try
         {
            return StringNumberParser.parseTime(value);
         }
         catch (NumberFormatException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }
      }
      return defaultValue;
   }
508924
public String query(String paramName, String defaultValue) {
        return this.request.query(paramName, defaultValue);
    }
1280750
public static String getRequestParameterValue(final HttpServletRequest request, final String key) {
		String[] values = getRequestParameterValues(request, key);
		return values == null || values.length == 0 ? null : values[0];
	}
946029
public static long getLong(java.util.Properties properties,
                               String prop, long defaultVal) {
        String propVal = properties.getProperty(prop);
        return  (propVal != null)
            ? Long.parseLong(propVal)
            : defaultVal;
    }
176023
public String getParam(final HttpServletRequest request, final String name,
      final String defaultVal) {
    return HttpRequestUtils.getParam(request, name, defaultVal);
  }
1251921
public static Long getLongParameter(final HttpServletRequest request, final String name) {
		String value = request.getParameter(name);
		if (StringUtils.isBlank(value)) {
			return null;
		}
		return Long.valueOf(value);
	}
274535
function (operation, parameter) {
  // TODO the reference to operation.api is not available
  if (operation.api && operation.api.parameterMacro) {
    return operation.api.parameterMacro(operation, parameter);
  } else {
    return parameter.defaultValue;
  }
}
1042985
protected static int getIntInitParameter(ServletContext servletContext, String parameterName, int defaultValue) {
    final String parameterString = servletContext.getInitParameter(parameterName);
    if(parameterString != null && parameterString.trim().length() > 0) {
      try {
        return Integer.parseInt(parameterString);
      }
      catch (NumberFormatException e) {
        // Do nothing, return default value
      }
    }
    return defaultValue;
  }
344662
private String getParameter(String paramKey, String defaultValue) {
        String paramValue = defaultValue;
        if (StringUtils.isNotBlank(paramKey) && args != null && args.length > 0) {
            for (String arg : args) {
                String[] parameter = arg.split("=");
                if (parameter != null && parameter.length == 2 && paramKey.equals(parameter[0])) {
                    paramValue = parameter[1];
                    break;
                }
            }
        }
        return paramValue;
    }