All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.valubio.taobao.api.TaobaoBatchRequest Maven / Gradle / Ivy

The newest version!
package com.valubio.taobao.api;

import com.valubio.taobao.api.internal.util.TaobaoHashMap;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 批量API请求包装类。
 */
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 request) {
        if (this.requestList == null) {
            this.requestList = new ArrayList>();
        }
        this.requestList.add(request);
        return this;
    }

    public void check() throws ApiRuleException {
    }

    public Class getResponseClass() {
        return TaobaoBatchResponse.class;
    }

    public Map getTextParams() {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy