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

org.kie.config.cli.command.impl.AbstractCliCommand Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta1
Show newest version
package org.kie.config.cli.command.impl;

import java.util.Map;

import org.kie.config.cli.command.CliCommand;

public abstract class AbstractCliCommand implements CliCommand {

    protected String printEnvironment(Map env) {
        StringBuffer data = new StringBuffer();
        data.append("{");
        for (Map.Entry entry : env.entrySet()) {
            data.append(entry.getKey());
            data.append("=");
            if (entry.getKey().equalsIgnoreCase("password")) {
                data.append("****");
            } else {
                data.append(entry.getValue());
            }
            data.append(", ");
        }
        data.delete(data.length()-2, data.length());
        data.append("}");
        return data.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy