com.taobao.api.TaobaoBatchRequest Maven / Gradle / Ivy
package com.taobao.api;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.taobao.api.internal.util.TaobaoHashMap;
/**
* 批量API请求包装类。
*
* @author fengsheng
* @since Jan 6, 2016
*/
public class TaobaoBatchRequest extends BaseTaobaoRequest {
private String publicMethod; // 公共方法
private TaobaoHashMap publicParams; // 公共参数
private List> requestList;
public String getPublicMethod() {
return publicMethod;
}
public void setPublicMethod(String publicMethod) {
this.publicMethod = publicMethod;
}
public TaobaoHashMap getPublicParams() {
if (this.publicParams == null) {
this.publicParams = new TaobaoHashMap();
}
return this.publicParams;
}
public void setPublicParams(TaobaoHashMap publicParams) {
this.publicParams = publicParams;
}
public void addPublicParam(String key, String value) {
getPublicParams().put(key, value);
}
public List> getRequestList() {
return this.requestList;
}
public void setRequestList(List> requestList) {
this.requestList = requestList;
}
public TaobaoBatchRequest addRequest(TaobaoRequest extends TaobaoResponse> request) {
if (this.requestList == null) {
this.requestList = new ArrayList>();
}
this.requestList.add(request);
return this;
}
public void check() throws ApiRuleException {
}
public String getApiMethodName() {
return null;
}
public Class getResponseClass() {
return TaobaoBatchResponse.class;
}
public Map getTextParams() {
return null;
}
}