public class BrooklynPropertiesImpl extends java.lang.Object implements BrooklynProperties
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
BrooklynPropertiesImpl.Factory  | 
ConfigMap.ConfigMapWithInheritance<TContainer>| Modifier and Type | Method and Description | 
|---|---|
BrooklynPropertiesImpl | 
addEnvironmentVars()  | 
BrooklynPropertiesImpl | 
addFrom(ConfigBag cfg)  | 
BrooklynPropertiesImpl | 
addFrom(java.io.File f)  | 
BrooklynPropertiesImpl | 
addFrom(java.io.InputStream i)  | 
BrooklynPropertiesImpl | 
addFrom(java.util.Map map)  | 
BrooklynPropertiesImpl | 
addFrom(java.net.URL u)  | 
BrooklynPropertiesImpl | 
addFromMap(java.util.Map properties)
adds the indicated properties 
 | 
BrooklynPropertiesImpl | 
addFromUrl(java.lang.String url)  | 
BrooklynPropertiesImpl | 
addFromUrlProperty(java.lang.String urlProperty)
expects a property already set in scope, whose value is acceptable to  
addFromUrl(String);
 if property not set, does nothing | 
BrooklynPropertiesImpl | 
addSystemProperties()  | 
java.util.Map<java.lang.String,java.lang.Object> | 
asMapWithStringKeys()
returns a read-only map view which has string keys (corresponding to the config key names);
 callers encouraged to use the typed keys (and so not use this method),
 but in some compatibility areas having a Properties-like view is useful 
 | 
boolean | 
containsKey(ConfigKey<?> key)  | 
boolean | 
containsKey(java.lang.String key)  | 
java.util.Set<ConfigKey<?>> | 
findKeys(<any> filter)
Deprecated.  
 | 
java.util.Set<ConfigKey<?>> | 
findKeysDeclared(<any> filter)
returns all keys present in the map matching the given filter predicate; see ConfigPredicates for common predicates. 
 | 
java.util.Set<ConfigKey<?>> | 
findKeysPresent(<any> filter)
as  
#findKeysDeclared(Predicate) but restricted to keys actually present in the map | 
java.lang.String | 
get(java.util.Map flags,
   java.lang.String key)
Deprecated. 
 
attempts to call get with this syntax are probably mistakes; get(key, defaultValue) is fine but
 Map is unlikely the key, much more likely they meant getFirst(flags, key). 
 | 
java.util.Map<ConfigKey<?>,java.lang.Object> | 
getAllConfig()
Deprecated.  
 | 
java.util.Map<ConfigKey<?>,java.lang.Object> | 
getAllConfigLocalRaw()
returns a read-only map of all local config keys with their raw (unresolved+uncoerced) contents 
 | 
<T> T | 
getConfig(ConfigKey.HasConfigKey<T> key)  | 
<T> T | 
getConfig(ConfigKey.HasConfigKey<T> key,
         T defaultValue)  | 
<T> T | 
getConfig(ConfigKey<T> key)  | 
<T> T | 
getConfig(ConfigKey<T> key,
         T defaultValue)
Returns value stored against the given key,
 resolved (if it is a Task, possibly blocking), and coerced to the appropriate type, 
 or given default value if not set, 
 unless the default value is null in which case it returns the default. 
 | 
java.lang.Object | 
getConfig(java.lang.String key)  | 
Maybe<java.lang.Object> | 
getConfigLocalRaw(ConfigKey<?> key)
returns the value stored against the given key, 
 not any default,
 not inherited (if there is an inheritance hierarchy),
 not type-coerced or further resolved (eg a task or supplier, if such rules are applicable) 
 | 
Maybe<java.lang.Object> | 
getConfigRaw(ConfigKey<?> key)  | 
Maybe<java.lang.Object> | 
getConfigRaw(ConfigKey<?> key,
            boolean includeInherited)
Inheritance is ignored here. 
 | 
java.lang.String | 
getFirst(java.util.Map flags,
        java.lang.String... keys)
returns the value of the first key which is defined 
 | 
java.lang.String | 
getFirst(java.lang.String... keys)
returns the value of the first key which is defined 
 | 
boolean | 
isEmpty()  | 
<T> java.lang.Object | 
put(ConfigKey.HasConfigKey<T> key,
   T value)  | 
<T> java.lang.Object | 
put(ConfigKey<T> key,
   T value)  | 
java.lang.Object | 
put(java.lang.Object rawKey,
   java.lang.Object value)
like normal map.put, except config keys are dereferenced on the way in 
 | 
void | 
putAll(java.util.Map vals)
like normal map.putAll, except config keys are dereferenced on the way in 
 | 
<T> boolean | 
putIfAbsent(ConfigKey<T> key,
           T value)  | 
boolean | 
putIfAbsent(java.lang.String key,
           java.lang.Object value)
inserts the value under the given key, if it was not present 
 | 
boolean | 
remove(ConfigKey<?> key)  | 
boolean | 
remove(java.lang.String key)  | 
int | 
size()  | 
BrooklynProperties | 
submap(<any> filter)
returns submap matching the given filter predicate; see ConfigPredicates for common predicates 
 | 
BrooklynProperties | 
submapByName(<any> filter)  | 
java.lang.String | 
toString()  | 
public BrooklynPropertiesImpl addEnvironmentVars()
addEnvironmentVars in interface BrooklynPropertiespublic BrooklynPropertiesImpl addSystemProperties()
addSystemProperties in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFrom(ConfigBag cfg)
addFrom in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFrom(java.util.Map map)
addFrom in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFrom(java.io.InputStream i)
addFrom in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFrom(java.io.File f)
addFrom in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFrom(java.net.URL u)
addFrom in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFromUrl(java.lang.String url)
public BrooklynPropertiesImpl addFromUrlProperty(java.lang.String urlProperty)
addFromUrl(String);
 if property not set, does nothingaddFromUrlProperty in interface BrooklynPropertiespublic BrooklynPropertiesImpl addFromMap(java.util.Map properties)
addFromMap in interface BrooklynPropertiespublic boolean putIfAbsent(java.lang.String key,
                           java.lang.Object value)
putIfAbsent in interface BrooklynProperties@Deprecated
public java.lang.String get(java.util.Map flags,
                                        java.lang.String key)
get in interface BrooklynPropertiespublic java.lang.String getFirst(java.lang.String... keys)
takes the following flags: 'warnIfNone', 'failIfNone' (both taking a boolean (to use default message) or a string (which is the message)); and 'defaultIfNone' (a default value to return if there is no such property); defaults to no warning and null response
getFirst in interface StringConfigMapgetFirst in interface BrooklynPropertiesStringConfigMap.getFirst(java.util.Map, String...)public java.lang.String getFirst(java.util.Map flags,
                                 java.lang.String... keys)
StringConfigMaptakes the following flags: 'warnIfNone' or 'failIfNone' (both taking a boolean (to use default message) or a string (which is the message)); and 'defaultIfNone' (a default value to return if there is no such property); defaults to no warning and null default value
getFirst in interface StringConfigMapgetFirst in interface BrooklynPropertiespublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object put(java.lang.Object rawKey,
                            java.lang.Object value)
put in interface BrooklynPropertiespublic void putAll(java.util.Map vals)
putAll in interface BrooklynPropertiespublic <T> java.lang.Object put(ConfigKey.HasConfigKey<T> key, T value)
put in interface BrooklynPropertiespublic <T> java.lang.Object put(ConfigKey<T> key, T value)
put in interface BrooklynPropertiespublic <T> boolean putIfAbsent(ConfigKey<T> key, T value)
putIfAbsent in interface BrooklynPropertiespublic java.lang.Object getConfig(java.lang.String key)
getConfig in interface BrooklynPropertiespublic <T> T getConfig(ConfigKey<T> key)
getConfig in interface ConfigMapgetConfig in interface BrooklynProperties#getConfig(ConfigKey, Object), with default value as per the key, or nullpublic <T> T getConfig(ConfigKey.HasConfigKey<T> key)
getConfig in interface ConfigMapgetConfig in interface BrooklynProperties#getConfig(ConfigKey, Object), with default value as per the key, or nullpublic <T> T getConfig(ConfigKey.HasConfigKey<T> key, T defaultValue)
getConfig in interface BrooklynPropertiespublic <T> T getConfig(ConfigKey<T> key, T defaultValue)
BrooklynPropertiesgetConfig in interface BrooklynPropertiespublic Maybe<java.lang.Object> getConfigRaw(ConfigKey<?> key)
getConfigRaw in interface BrooklynPropertiespublic Maybe<java.lang.Object> getConfigRaw(ConfigKey<?> key, boolean includeInherited)
BrooklynPropertiesBrooklynProperties.getConfigRaw(ConfigKey).getConfigRaw in interface ConfigMapgetConfigRaw in interface BrooklynPropertieskey - key to look upincludeInherited - for ConfigMap instances which have an inheritance hierarchy, 
        whether to traverse it or not; has no effects where there is no inheritancepublic Maybe<java.lang.Object> getConfigLocalRaw(ConfigKey<?> key)
ConfigMapgetConfigLocalRaw in interface ConfigMapkey - key to look uppublic java.util.Map<ConfigKey<?>,java.lang.Object> getAllConfigLocalRaw()
ConfigMapgetAllConfigLocalRaw in interface ConfigMap@Deprecated public java.util.Map<ConfigKey<?>,java.lang.Object> getAllConfig()
ConfigMapgetAllConfig in interface ConfigMapgetAllConfig in interface BrooklynProperties@Deprecated public java.util.Set<ConfigKey<?>> findKeys(<any> filter)
public java.util.Set<ConfigKey<?>> findKeysDeclared(<any> filter)
ConfigMap#findKeysPresent(Predicate))findKeysDeclared in interface ConfigMappublic java.util.Set<ConfigKey<?>> findKeysPresent(<any> filter)
ConfigMap#findKeysDeclared(Predicate) but restricted to keys actually present in the map
 if there is a container or type context defining reference keys, those key definitions will be preferred over any config keys used as keys in this map.
findKeysPresent in interface ConfigMappublic BrooklynProperties submap(<any> filter)
StringConfigMapsubmap in interface ConfigMapsubmap in interface StringConfigMapsubmap in interface BrooklynPropertiespublic BrooklynProperties submapByName(<any> filter)
submapByName in interface BrooklynPropertiespublic java.util.Map<java.lang.String,java.lang.Object> asMapWithStringKeys()
StringConfigMapasMapWithStringKeys in interface ConfigMapasMapWithStringKeys in interface StringConfigMapasMapWithStringKeys in interface BrooklynPropertiespublic boolean containsKey(java.lang.String key)
containsKey in interface BrooklynPropertiespublic boolean containsKey(ConfigKey<?> key)
containsKey in interface BrooklynPropertiespublic boolean remove(java.lang.String key)
remove in interface BrooklynPropertiespublic boolean remove(ConfigKey<?> key)
remove in interface BrooklynProperties