public class ConfigUtils
extends java.lang.Object
Constructor and Description |
---|
ConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addUnprefixedConfigKeyInConfigBack(java.lang.String configPrefix,
ConfigBag configBag,
java.util.Map<java.lang.String,java.lang.Object> destinationBucket)
Look for keys with
configPrefix in configBag and
those which have configPrefix are added in destinationBucket but without configPrefix . |
static BrooklynProperties |
filterFor(BrooklynProperties properties,
<any> filter) |
static BrooklynProperties |
filterForPrefix(BrooklynProperties properties,
java.lang.String prefix) |
static BrooklynProperties |
filterForPrefixAndStrip(java.util.Map<java.lang.String,?> properties,
java.lang.String prefix)
prefix generally ends with a full stop
|
static <T> T |
getRequiredConfig(Entity entity,
ConfigKey<T> key) |
static java.util.Set<ConfigKey.HasConfigKey<?>> |
getStaticKeysOnClass(java.lang.Class<?> type) |
static BrooklynProperties |
loadFromFile(java.lang.String file) |
static <T> ConfigKey<T> |
prefixedKey(java.lang.String prefix,
ConfigKey<T> key)
prepends the given prefix to the key.
|
static <T> ConfigKey<T> |
unprefixedKey(java.lang.String prefix,
ConfigKey<T> key)
removes the given prefix from the key for configuration purposes; logs warning and does nothing if there is no such prefix.
|
public static <T> ConfigKey<T> prefixedKey(java.lang.String prefix, ConfigKey<T> key)
public static <T> ConfigKey<T> unprefixedKey(java.lang.String prefix, ConfigKey<T> key)
public static BrooklynProperties loadFromFile(java.lang.String file)
public static BrooklynProperties filterFor(BrooklynProperties properties, <any> filter)
public static BrooklynProperties filterForPrefix(BrooklynProperties properties, java.lang.String prefix)
public static BrooklynProperties filterForPrefixAndStrip(java.util.Map<java.lang.String,?> properties, java.lang.String prefix)
public static java.util.Set<ConfigKey.HasConfigKey<?>> getStaticKeysOnClass(java.lang.Class<?> type)
public static void addUnprefixedConfigKeyInConfigBack(java.lang.String configPrefix, ConfigBag configBag, java.util.Map<java.lang.String,java.lang.Object> destinationBucket)
configPrefix
in configBag
and
those which have configPrefix
are added in destinationBucket
but without configPrefix
.configPrefix
- prefix to look forconfigBag
- keys to look indestinationBucket
- should not be an ImmutableMap