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

com.ctaiot.bean.PrintPayLoad Maven / Gradle / Ivy

package com.ctaiot.bean;


import java.util.*;

public class PrintPayLoad {

    private Map params;

    private String token;

    @Deprecated
    private String clientId;

    private Map headers;

    public PrintPayLoad() {
    }

    public Map getParams() {
        return params;
    }

    public void setParams(Map params) {
        this.params = params;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Deprecated
    public String getClientId() {
        return clientId;
    }

    @Deprecated
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public Map getHeaders() {
        return headers;
    }

    public void setHeaders(Map headers) {
        this.headers = headers;
    }

    public String toParams() {
        if (params == null || params.isEmpty()) {
            return null;
        }
        StringBuilder stringBuilder = new StringBuilder();

        int index = 0;
        Object value;
        for (String str : params.keySet()) {
            index++;

            value = params.get(str);
            stringBuilder.append(str).append("=");
            if (Objects.nonNull(value)) {
                stringBuilder.append(value);
            }
            if (params.size() > 1
                    && params.size() != index) {
                stringBuilder.append("&");
            }
        }
        return stringBuilder.toString();
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy