org.fisco.bcos.sdk.config.model.ConfigProperty Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2014-2020 [fisco-dev]
*
* 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.fisco.bcos.sdk.config.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import java.util.Map;
/**
* ConfigOption is the java object of the config file.
*
* @author Maggie
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ConfigProperty {
public Map cryptoMaterial;
public Map network;
public List amop;
public Map account;
public Map threadPool;
public Map getCryptoMaterial() {
return cryptoMaterial;
}
public void setCryptoMaterial(Map cryptoMaterial) {
this.cryptoMaterial = cryptoMaterial;
}
public Map getNetwork() {
return network;
}
public void setNetwork(Map network) {
this.network = network;
}
public List getAmop() {
return amop;
}
public void setAmop(List amop) {
this.amop = amop;
}
public Map getAccount() {
return account;
}
public void setAccount(Map account) {
this.account = account;
}
public Map getThreadPool() {
return threadPool;
}
public void setThreadPool(Map threadPool) {
this.threadPool = threadPool;
}
public static String getValue(Map config, String key, String defaultValue) {
if (config == null || config.get(key) == null) {
return defaultValue;
}
return (String) config.get(key);
}
}