Brooklyn

brooklyn.event.basic
[Java] Class MapConfigKey

java.lang.Object
  brooklyn.event.basic.BasicConfigKey
      brooklyn.event.basic.MapConfigKey
All Implemented Interfaces:
StructuredConfigKey

public class MapConfigKey
extends BasicConfigKey

A config key which represents a map, where contents can be accessed directly via subkeys. Items added directly to the map must be of type map, and are put (as individual subkeys).

You can also pass an appropriate MapModification from MapModifications to clear (and clear-and-set).


Nested Class Summary
interface MapConfigKey.MapModification

when passed as a value to a MapConfigKey, causes each of these items to be put (this Mod is redundant as no other value is really sensible)

static class MapConfigKey.MapModificationBase

static class MapConfigKey.MapModifications

 
Field Summary
java.lang.Class subType

 
Constructor Summary
MapConfigKey(java.lang.Class subType, java.lang.String name)

MapConfigKey(java.lang.Class subType, java.lang.String name, java.lang.String description)

MapConfigKey(java.lang.Class subType, java.lang.String name, java.lang.String description, java.util.Map defaultValue)

 
Method Summary
protected java.lang.Object applyEntryValueToMap(Entry value, java.util.Map target)

java.lang.Object applyValueToMap(java.lang.Object value, java.util.Map target)

java.lang.String extractSubKeyName(ConfigKey subKey)

java.util.Map extractValue(java.util.Map vals, ExecutionContext exec)

boolean isSet(java.util.Map vals)

boolean isSubKey(java.lang.Object contender)

boolean isSubKey(ConfigKey contender)

java.util.Map rawValue(java.util.Map vals)

returns the entries in the map against this config key and any sub-config-keys, without resolving (like extractValue(Map, ExecutionContext) but without resolving/coercing; useful because values in this "map" are actually stored against SubElementConfigKeys

ConfigKey subKey(java.lang.String subName)

ConfigKey subKey(java.lang.String subName, java.lang.String description)

 
Methods inherited from class BasicConfigKey
BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, BasicConfigKey, builder, builder, equals, extractValue, getDefaultValue, getDescription, getName, getNameParts, getType, getTypeName, getTypeToken, hasDefaultValue, hashCode, isReconfigurable, isSet, resolveValue, toString
 

Field Detail

subType

public final java.lang.Class subType


 
Constructor Detail

MapConfigKey

public MapConfigKey(java.lang.Class subType, java.lang.String name)


MapConfigKey

public MapConfigKey(java.lang.Class subType, java.lang.String name, java.lang.String description)


MapConfigKey

}
public MapConfigKey(java.lang.Class subType, java.lang.String name, java.lang.String description, java.util.Map defaultValue)


 
Method Detail

applyEntryValueToMap

} else if (k instanceof String) {
protected java.lang.Object applyEntryValueToMap(Entry value, java.util.Map target)


applyValueToMap

if (value instanceof StructuredModification)
return ((StructuredModification)value).applyToKeyInMap(this, target);
public java.lang.Object applyValueToMap(java.lang.Object value, java.util.Map target)


extractSubKeyName

public java.lang.String extractSubKeyName(ConfigKey subKey)


extractValue

if (isSubKey(k)) {
public java.util.Map extractValue(java.util.Map vals, ExecutionContext exec)


isSet

if (isSubKey(contender)) {
public boolean isSet(java.util.Map vals)


isSubKey

public boolean isSubKey(java.lang.Object contender)


isSubKey

public boolean isSubKey(ConfigKey contender)


rawValue

public java.util.Map rawValue(java.util.Map vals)
returns the entries in the map against this config key and any sub-config-keys, without resolving (like extractValue(Map, ExecutionContext) but without resolving/coercing; useful because values in this "map" are actually stored against SubElementConfigKeys


subKey

public ConfigKey subKey(java.lang.String subName)


subKey

public ConfigKey subKey(java.lang.String subName, java.lang.String description)


 

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