Adds map-based parameters to the request.

@param parameters Map of parameters.
@param suppressNull If true, ignore null parameters.
186896
public void addParameters(Map<String, Object> parameters, boolean suppressNull) {
        
        for (String name : parameters.keySet()) {
            Object value = parameters.get(name);
            
            if (!suppressNull || value != null) {
                addParameter(name, value);
            }
        }
    }
413482
void addParameter(String parameter) {

        TextField textField = new TextField();
        if (parameter != null) {
            textField.setValue(parameter);
        }
        m_parameterGroup.addRow(textField);
    }
198000
public void addParameterSources(List<ParameterBinding> parameters) {
        assert parameters != null;
        for (ParameterBinding parameter : parameters) {
        	DataSource<?> inputValue = rpcSourceFromParameter(parameter);            
            this.inputSources.put(parameter.getName(), inputValue);
        }
    }
140237
@Override
    public void setParameter(Map<String, String> paraMap) {
        if (paraMap.containsKey("k")) {
            this.k = Integer.parseInt(paraMap.get("k"));
        }
        if (paraMap.containsKey("mode")) {
            this.mode = Integer.parseInt(paraMap.get("mode"));
        }
    }
452341
private void addQueryParameters(HttpRequestBase request, Map<String, String> params) {
        if (params != null) {
            URIBuilder builder = new URIBuilder(request.getURI());
            for(Map.Entry<String, String> param : params.entrySet()) {
                builder.addParameter(param.getKey(), param.getValue());
            }
            try {
                request.setURI(builder.build());
            } catch (URISyntaxException e) {
                throw new RuntimeException("Unable to construct API URI", e);
            }
        }
    }
1259929
private void addParams(Map<String, Object> dbServiceParams) {
        if (dbServiceParams != null) {
            for (String paramName : dbServiceParams.keySet()) {
                m_serviceParamMap.put(paramName, dbServiceParams.get(paramName));
            }
        }
    }
1266670
public static void addParameters(final IRequestParameters parameters,
		final Map<String, String[]> parameterMap)
	{
		final Set<String> parameterNames = parameters.getParameterNames();
		for (final String parameterName : parameterNames)
		{
			final List<StringValue> parameterValues = parameters.getParameterValues(parameterName);
			String[] stringArray = { };
			if ((parameterValues != null) && !parameterValues.isEmpty())
			{
				stringArray = new String[parameterValues.size()];
				for (int i = 0; i < parameterValues.size(); i++)
				{
					stringArray[i] = parameterValues.get(i).toString();
				}
				if (parameterMap.containsKey(parameterName))
				{
					stringArray = ArrayUtils.addAll(parameterMap.get(parameterName), stringArray);
				}
			}
			parameterMap.put(parameterName, stringArray);
		}
	}
1148458
public void add(final Param key, final String[] value) {
        if (value != null && value.length > 0) {
            parameters.put(key, toList(value));
        }
    }
100024
public void setParameters(SortedMap<String, String> parameters) {

        checkFrozen();
        if (parameters == null) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_PARAMS_0));
        }
        // make sure the parameters are a sorted map
        m_parameters = new TreeMap<String, String>(parameters);
    }
2335
public void addFunctionParameter(final String param) {
    if (param == null || param.isEmpty()) {
      throw new IllegalArgumentException("Parameter cannot be null or empty");
    }
    if (func_params == null) {
      func_params = Lists.newArrayList();
    }
    func_params.add(param);
  }
551423
public void pushParameterStack(Map parameters)
    {
        if (parameters == null)
        {
            _paramStack.push(null);
        } else {
            _paramStack.push(((Hashtable)parameters).clone());
        }
    }
638541
private void addParams(RequestBuilder call, Param[] params) {
		
		// Once upon a time this was necessary, now it isn't
		//call.addParam("format", "json");
		
		if (this.accessToken != null)
			call.addParam("access_token", this.accessToken);

		if (this.appSecretProof != null)
			call.addParam("appsecret_proof", this.appSecretProof);

		if (params != null) {
			for (Param param: params) {
				if (param instanceof BinaryParam) {
					call.addParam(param.name, (InputStream)param.value, ((BinaryParam)param).contentType, "irrelevant");
				} else {
					String paramValue = StringUtils.stringifyValue(param, this.mapper);
					call.addParam(param.name, paramValue);
				}
			}
		}
	}
266902
public void addStatusMapping(Map<String, Integer> statusMapping) {
		Assert.notNull(statusMapping, "StatusMapping must not be null");
		this.statusMapping.putAll(statusMapping);
	}
1278997
protected void appendParameters(StringBuilder buffer,String parameters)
    {
        if((parameters!=null)&&(parameters.length()>0))
        {
            String updatedParameters=parameters;
            if(parameters.startsWith("?"))
            {
                updatedParameters=parameters.substring(1);
            }
            
            if(updatedParameters.length()>0)
            {
                int currentLength=buffer.length();
                if((currentLength>0)&&(buffer.charAt(currentLength-1)=='/'))
                {
                    int length=currentLength;
                    buffer.delete(length-1,length);
                }
                
                //add separator
                buffer.append("?");
    
                try
                {
                    String[] parameterPairs=updatedParameters.split("&");
                    int amount=parameterPairs.length;
                    String parameterPair=null;
                    String[] values=null;
                    boolean addedParameters=false;
                    for(int index=0;index<amount;index++)
                    {
                        //get next element
                        parameterPair=parameterPairs[index];
                        
                        //split to key/value
                        values=parameterPair.split("=");
                        if(values.length==2)
                        {
                            if(addedParameters)
                            {
                                buffer.append("&");
                            }
                            
                            buffer.append(URLEncoder.encode(values[0],"UTF-8"));
                            buffer.append("=");
                            buffer.append(URLEncoder.encode(values[1],"UTF-8"));
                            
                            //set flag
                            addedParameters=true;
                        }
                    }
                }
                catch(Exception exception)
                {
                    throw new FaxException("Unable to encode parameters.",exception);
                }
            }
        }
    }
890587
public static void parametersNotNull(final String names, final Object... objects) {
        String msgPrefix = "At least one of the parameters";

        if (objects != null) {
            if (objects.length == 1) {
                msgPrefix = "Parameter";
            }

            for (final Object object : objects) {
                if (object == null) {
                    raiseError(String.format("%s '%s' is null.", msgPrefix, names));
                }
            }
        }
    }
1141352
private void addQueryParams(final Request request) {
        if (areaCode != null) {
            request.addQueryParam("AreaCode", areaCode.toString());
        }

        if (contains != null) {
            request.addQueryParam("Contains", contains);
        }

        if (smsEnabled != null) {
            request.addQueryParam("SmsEnabled", smsEnabled.toString());
        }

        if (mmsEnabled != null) {
            request.addQueryParam("MmsEnabled", mmsEnabled.toString());
        }

        if (voiceEnabled != null) {
            request.addQueryParam("VoiceEnabled", voiceEnabled.toString());
        }

        if (excludeAllAddressRequired != null) {
            request.addQueryParam("ExcludeAllAddressRequired", excludeAllAddressRequired.toString());
        }

        if (excludeLocalAddressRequired != null) {
            request.addQueryParam("ExcludeLocalAddressRequired", excludeLocalAddressRequired.toString());
        }

        if (excludeForeignAddressRequired != null) {
            request.addQueryParam("ExcludeForeignAddressRequired", excludeForeignAddressRequired.toString());
        }

        if (beta != null) {
            request.addQueryParam("Beta", beta.toString());
        }

        if (nearNumber != null) {
            request.addQueryParam("NearNumber", nearNumber.toString());
        }

        if (nearLatLong != null) {
            request.addQueryParam("NearLatLong", nearLatLong);
        }

        if (distance != null) {
            request.addQueryParam("Distance", distance.toString());
        }

        if (inPostalCode != null) {
            request.addQueryParam("InPostalCode", inPostalCode);
        }

        if (inRegion != null) {
            request.addQueryParam("InRegion", inRegion);
        }

        if (inRateCenter != null) {
            request.addQueryParam("InRateCenter", inRateCenter);
        }

        if (inLata != null) {
            request.addQueryParam("InLata", inLata);
        }

        if (inLocality != null) {
            request.addQueryParam("InLocality", inLocality);
        }

        if (faxEnabled != null) {
            request.addQueryParam("FaxEnabled", faxEnabled.toString());
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
263014
@InterfaceAudience.Public
    public void setHeaders(Map<String, Object> requestHeadersParam) {
        if (requestHeadersParam != null && !requestHeaders.equals(requestHeadersParam)) {
            requestHeaders = requestHeadersParam;
        }
    }