Gets the int param with a given name and throws an exception accordingly if not found or
valid.

@param params the params
@param paramName the param name
@return the int param
@throws ApiException the api exception
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);
		}
	}
1298406
public String param(final String name) {
        try {
            return request.getParameter(name);
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Can't parse request parameter [uri=" + request.getRequestURI() + ", method=" + request.getMethod() + ", parameterName=" + name + "]: " + e.getMessage());

            return null;
        }
    }
941357
@SuppressWarnings("rawtypes")
    protected String parseStringParameter(Map params, String paramName) {
        Object paramModel = params.get(paramName);
        if (paramModel == null) {
            return null;
        }
        if (!(paramModel instanceof SimpleScalar)) {
            throw new IllegalArgumentException(paramName + " must be string");
        }
        return ((SimpleScalar)paramModel).getAsString();
    }
502113
public String getParameter(String name) {
        String[] values = parameters.get(name);
        if (values == null) {
            return null;
        }

        if (values.length == 0) {
            return "";
        }
        return values[0];
    }
265202
public Api getActionResult(String action, String params) throws Exception {
    Api result = this.getActionResult(action, params, null, null);
    return result;
  }
416192
public Integer get(String name) throws IOException {
        if (name.equalsIgnoreCase(REASON)) {
            return new Integer(reasonCode);
        } else {
            throw new IOException
                ("Name not supported by CRLReasonCodeExtension");
        }
    }
766053
public void addParameter(String paramName, String paramValue) 
    throws IllegalArgumentException {
        log.trace("enter PostMethod.addParameter(String, String)");

        if ((paramName == null) || (paramValue == null)) {
            throw new IllegalArgumentException(
                "Arguments to addParameter(String, String) cannot be null");
        }
        super.clearRequestBody();
        this.params.add(new NameValuePair(paramName, paramValue));
    }
524027
public String getParameter(String name) {

        String[] p = getParameterMap().get(name);
        if (p != null) {
            return p[0];
        }

        return null;
    }
1024860
public IUpdater getUpdaterByParam(String paramName) {
        String sub = paramName.substring(1);
        return fwd.getUpdaterByParam(sub);
    }
796747
public ParameterBinding getBindingFor(String name) {

        Assert.hasText(name, PARAMETER_NAME_MISSING);

        for (ParameterBinding binding : bindings) {
            if (binding.hasName(name)) {
                return binding;
            }
        }

        throw new IllegalArgumentException(String.format("No parameter binding found for name %s!", name));
    }
276129
public Set<Method> getMethods(final String name, final int numParams) {
      if (StringUtils.isNullOrBlank(name) || numParams < 0) {
         return Collections.emptySet();
      }
      return ClassDescriptorCache.getInstance()
                                 .getClassDescriptor(clazz)
                                 .getMethods(accessAll)
                                 .stream()
                                 .filter(f -> f.getName().equals(name) && f.getParameterCount() == numParams)
                                 .collect(Collectors.toSet());
   }
1155282
@Override
    public Object getValue(String paramName) throws IllegalArgumentException {
        if (!hasValue(paramName)) {
            throw new IllegalArgumentException("Can't find criteria with name " + paramName);
        }
        if (LIMIT_NAME.equals(paramName)) {
            return limit;
        }
        if (OFFSET_NAME.equals(paramName)) {
            return offset;
        }
        return criterias.get(paramName).getValue();
    }
1069336
private int nameToIndex(String parameterName) throws SQLException {
    parameterMetadata.readMetadataFromDbIfRequired();
    for (int i = 1; i <= parameterMetadata.getParameterCount(); i++) {
      String name = parameterMetadata.getName(i);
      if (name != null && name.equalsIgnoreCase(parameterName)) {
        return i;
      }
    }
    throw new SQLException("there is no parameter with the name " + parameterName);
  }
9318
public static <T> T get(String className, Object... params) {
		final Class<T> clazz = ClassUtil.loadClass(className);
		return get(clazz, params);
	}
1065206
public String getLocalParameter( String paramName )
    {
        if ( _additionalParameters != null )
        {
            String overrideParam = ( String ) _additionalParameters.get( paramName );

            if ( overrideParam != null )
            {
                return overrideParam;
            }
        }

        ServletRequest request = getRequest();
        String retVal = request.getParameter( _scopedContainer.getScopedName( paramName ) );

        if ( retVal == null && _isActiveRequest && paramName.startsWith( AUTOSCOPE_PREFIX ) )
        {
            retVal = request.getParameter( paramName );
        }
        
        return retVal;
    }
1014138
public int getInt(String key) {
    	String value = get(key);
    	Utils.require(value != null, key + " parameter is not set");
    	try {
    		return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(key + " parameter should be a number");
        }
    }
601040
@Override
    public String getInitParameter(String name) {
        String value = this.parametersMap.get(name);
        return value;
    }