public String getParameterValue(String pKey) { // Clarify: what is returned if param=value1,value2,value3? Just value1 // or all values? Object lParamValue = mParameterMap.get(new Key(pKey)); return (lParamValue == null) ? null : (String) lParamValue; }
public String render(Map.Entry tEntry) { return URLEncoder.encode(((Key)tEntry.getKey()).toString()) + "=" + URLEncoder.encode((String) tEntry.getValue()) + "&"; } };
protected void addQueryStringPayload(HTTPRequest httpRequest, QueryStringPayload queryStringPayload) { Iterator params = queryStringPayload.iterator(); while (params.hasNext()) { Map.Entry param = (Map.Entry) params.next(); String val = (String) param.getValue(); String paramKey = ((Key) param.getKey()).getKey(); String paramValue = val == null ? "" : val; httpRequest.parameter(paramKey, paramValue); } LOG.debug("Adding query string -> {}", queryStringPayload.toString()); }
public void deleteParameter(String key) { mParameterMap.remove(new Key(key)); } }
public void addParameter(String pKey, String pValue) { Object lPrevKey = mParameterMap.put(new Key(pKey), pValue); /* * if (lPrevKey != null) throw new ServiceException("Query contains * duplicate parameter: " + pKey, ServiceException.SERVICE_ERROR); */// Ignore duplicates, could be a replacement }
public void addParameter(final String pKey, final String pValue) { if (pKey != null && pKey.length() > 0) { mParameterMap.put(new Key(pKey), pValue); } }
public void replaceParameter(String pKey, String pValue) { mParameterMap.put(new Key(pKey), pValue); }
public String getParameterValue(final String pKey) { // Clarify: what is returned if param=value1,value2,value3? Just value1 or all values? if (pKey != null && pKey.length() > 0) { Object lParamValue = mParameterMap.get(new Key(pKey)); return (lParamValue == null) ? null : (String) lParamValue; } return null; }