public static ConfigKey<String> javaSysProp(String propertyName) { return UsesJava.JAVA_SYSPROPS.subKey(propertyName); }
/** replaces the attributes underneath the rootAttribute parameter with the given value; * see {@link #addLaunchAttributesMap(EntitySpec, Map)} for richer functionality */ public static void setLaunchAttribute(EntityInternal entity, String rootAttribute, Object value) { entity.setConfig(ChefSoloDriver.CHEF_LAUNCH_ATTRIBUTES.subKey(rootAttribute), value); }
/** replaces the attributes underneath the rootAttribute parameter with the given value; * see {@link #addLaunchAttributesMap(EntitySpec, Map)} for richer functionality */ public static void setLaunchAttribute(EntitySpec<?> entity, String rootAttribute, Object value) { entity.configure(ChefSoloDriver.CHEF_LAUNCH_ATTRIBUTES.subKey(rootAttribute), value); }
public ConfigKey<V> subKey(String subName) { return subKey(subName, "sub-element of " + getName() + ", named " + subName); } // it is not possible to supply default values
public static void addToCookbooksFromGithub(EntitySpec<?> entity, String cookbookName, String cookbookUrl) { entity.configure(ChefSoloDriver.CHEF_COOKBOOKS.subKey(cookbookName), cookbookUrl); }
public static void addToCookbooksFromGithub(EntityInternal entity, String cookbookName, String cookbookUrl) { entity.setConfig(ChefSoloDriver.CHEF_COOKBOOKS.subKey(cookbookName), cookbookUrl); }
@SuppressWarnings({ "rawtypes", "unchecked" }) protected Object applyEntryValueToMap(Entry value, Map target) { Object k = value.getKey(); if (isSubKey(k)) { // do nothing } else if (k instanceof String) { k = subKey((String)k); } else { log.warn("Unexpected subkey "+k+" being inserted into "+this+"; ignoring"); k = null; } if (k!=null) return target.put(k, value.getValue()); else return null; }