Brooklyn

brooklyn.config
[Java] Class ConfigUtils

java.lang.Object
  brooklyn.config.ConfigUtils

@SuppressWarnings({"unchecked"})
public class ConfigUtils

Method Summary
static BrooklynProperties filterForPrefix(BrooklynProperties properties, java.lang.String prefix)

static BrooklynProperties filterForPrefixAndStrip(java.util.Map properties, java.lang.String prefix)

prefix generally ends with a full stop

static java.lang.Object getRequiredConfig(Entity entity, ConfigKey key)

static java.util.Set getStaticKeysOnClass(java.lang.Class type)

static BrooklynProperties loadFromFile(java.lang.String file)

static ConfigKey prefixedKey(java.lang.String prefix, ConfigKey key)

prepends the given prefix to the key.

static ConfigKey unprefixedKey(java.lang.String prefix, ConfigKey key)

removes the given prefix from the key for configuration purposes; logs warning and does nothing if there is no such prefix.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

filterForPrefix

public static BrooklynProperties filterForPrefix(BrooklynProperties properties, java.lang.String prefix)


filterForPrefixAndStrip

public static BrooklynProperties filterForPrefixAndStrip(java.util.Map properties, java.lang.String prefix)
prefix generally ends with a full stop


getRequiredConfig

public static java.lang.Object getRequiredConfig(Entity entity, ConfigKey key)


getStaticKeysOnClass

@SuppressWarnings("rawtypes")
public static java.util.Set getStaticKeysOnClass(java.lang.Class type)


loadFromFile

public static BrooklynProperties loadFromFile(java.lang.String file)


prefixedKey

public static ConfigKey prefixedKey(java.lang.String prefix, ConfigKey key)
prepends the given prefix to the key. prefix will typically end with a ".". this is useful for configuration purposes when a subsystem uses a short-name config (e.g. "user") but in entity config or at the root (brooklyn.properties) there are longer names (e.g. "brooklyn.ssh.config.user"), and we wish to convert from the shorter names to the longer names.


unprefixedKey

public static ConfigKey unprefixedKey(java.lang.String prefix, ConfigKey key)
removes the given prefix from the key for configuration purposes; logs warning and does nothing if there is no such prefix. prefix will typically end with a ".". this is useful for configuration purposes when a subsystem uses a short-name config (e.g. "user") but in entity config or at the root (brooklyn.properties) there are longer names (e.g. "brooklyn.ssh.config.user"), and we wish to convert from the longer names to the short-name.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.