本文整理了Java中brooklyn.entity.basic.Entities.isSecret()
方法的一些代码示例,展示了Entities.isSecret()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entities.isSecret()
方法的具体详情如下:
包路径:brooklyn.entity.basic.Entities
类名称:Entities
方法名:isSecret
暂无
代码示例来源:origin: io.brooklyn/brooklyn-core
public static <K> Map<K,Object> sanitize(Map<K,?> input) {
Map<K,Object> result = Maps.newLinkedHashMap();
for (Map.Entry<K,?> e: input.entrySet()) {
if (isSecret(""+e.getKey())) result.put(e.getKey(), "xxxxxxxx");
else result.put(e.getKey(), e.getValue());
}
return result;
}
代码示例来源:origin: io.brooklyn/brooklyn-rest-server
private static Map<String, String> copyConfigsExceptSensitiveKeys(@SuppressWarnings("rawtypes") Set entries) {
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
for (Object entryO : entries) {
@SuppressWarnings("unchecked")
Map.Entry<String, ?> entry = (Map.Entry<String, ?>) entryO;
if (!Entities.isSecret(entry.getKey())) {
builder.put(entry.getKey(), entry.getValue() != null ? entry.getValue().toString() : null);
}
}
return builder.build();
}
}
代码示例来源:origin: io.brooklyn/brooklyn-rest
private static Map<String, String> copyConfigsExceptSensitiveKeys(@SuppressWarnings("rawtypes") Set entries) {
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
for (Object entryO : entries) {
@SuppressWarnings("unchecked")
Map.Entry<String, ?> entry = (Entry<String, ?>) entryO;
if (!Entities.isSecret(entry.getKey())) {
builder.put(entry.getKey(), entry.getValue() != null ? entry.getValue().toString() : null);
}
}
return builder.build();
}
代码示例来源:origin: io.brooklyn/brooklyn-core
public static void dumpInfo(Policy pol, Writer out, String currentIndentation, String tab) throws IOException {
out.append(currentIndentation+pol.toString()+"\n");
for (ConfigKey<?> key : sortConfigKeys(pol.getPolicyType().getConfigKeys())) {
Object val = ((AbstractPolicy)pol).getConfigMap().getRawConfig(key);
if (!isTrivial(val)) {
out.append(currentIndentation+tab+tab+key);
out.append(" = ");
if (isSecret(key.getName())) out.append("xxxxxxxx");
else out.append(""+val);
out.append("\n");
}
}
out.flush();
}
代码示例来源:origin: io.brooklyn/brooklyn-core
out.append(currentIndentation+tab+tab+key);
out.append(" = ");
if (isSecret(key)) out.append("xxxxxxxx");
else out.append(""+val);
out.append("\n");
out.append(currentIndentation+tab+tab+key);
out.append(" = ");
if (isSecret(key)) out.append("xxxxxxxx");
else out.append(""+val);
out.append("\n");
代码示例来源:origin: io.brooklyn/brooklyn-core
out.append(currentIndentation+tab+tab+it.getName());
out.append(" = ");
if (isSecret(it.getName())) out.append("xxxxxxxx");
else if ((v instanceof Task) && ((Task<?>)v).isDone()) {
if (((Task<?>)v).isError()) {
out.append(currentIndentation+tab+tab+it.getName());
out.append(": ");
if (isSecret(it.getName())) out.append("xxxxxxxx");
else out.append(""+v);
out.append("\n");
内容来源于网络,如有侵权,请联系作者删除!