
org.n3r.diamond.client.impl.PropertiesBasedMiner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of diamond-client Show documentation
Show all versions of diamond-client Show documentation
a config client of diamond
The newest version!
package org.n3r.diamond.client.impl;
import org.apache.commons.lang3.StringUtils;
import org.n3r.diamond.client.AbstractMiner;
import java.util.Properties;
public class PropertiesBasedMiner extends AbstractMiner {
private final Properties properties;
public PropertiesBasedMiner(Properties properties) {
this.properties = properties;
}
@Override
public String getStone(String group, String dataId) {
String key = StringUtils.isBlank(group) ? dataId : (group + "." + dataId);
String property = properties.getProperty(key);
return DiamondSubstituter.substitute(property, true, group, dataId, null);
}
@Override
public String getDefaultGroupName() {
return "";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy