/* * Copyright (c) 2016, Huawei Technologies Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openo.baseservice.roa.util.restclient; import java.util.HashMap; import java.util.Map; /** *
*

*

* * @author * @version SDNO 0.5 Aug 9, 2016 */ public class RestfulParametes { private Map paramMap = new HashMap<>(); private Map headerMap = new HashMap<>(); private String rawData = null; /** *
* * @param key * @return * @since SDNO 0.5 */ public String get(final String key) { return paramMap.get(key); } /** *
* * @param data * @since SDNO 0.5 */ public void setRawData(final String data) { this.rawData = data; } /** *
* * @return * @since SDNO 0.5 */ public String getRawData() { return this.rawData; } /** *
* * @param key * @param value * @return * @since SDNO 0.5 */ public String put(final String key, final String value) { return paramMap.put(key, value); } /** *
* * @param key * @param value * @return * @since SDNO 0.5 */ public String putHttpContextHeader(final String key, final String value) { return headerMap.put(key, value); } /** *
* * @param key * @param value * @return * @since SDNO 0.5 */ public String putHttpContextHeader(final String key, final int value) { return this.putHttpContextHeader(key, String.valueOf(value)); } /** *
* * @param key * @return * @since SDNO 0.5 */ public String getHttpContextHeader(final String key) { return headerMap.get(key); } /** *
* * @return * @since SDNO 0.5 */ public Map getParamMap() { return paramMap; } /** *
* * @param paramMap * @since SDNO 0.5 */ public void setParamMap(final Map paramMap) { this.paramMap = paramMap; } /** *
* * @return * @since SDNO 0.5 */ public Map getHeaderMap() { return this.headerMap; } /** *
* * @param headerMap * @since SDNO 0.5 */ public void setHeaderMap(final Map headerMap) { this.headerMap = headerMap; } }