private Set<String> getExternalComponents(ConfTreeOperations ops) throws BadConfigException { Set<String> externalComponents = new HashSet<>(); if (ops.getGlobalOptions().containsKey(COMPONENT_TYPE_KEY)) { throw new BadConfigException(COMPONENT_TYPE_KEY + " must be " + "specified per-component, not in global"); } for (Entry<String, Map<String, String>> entry : ops.getComponents() .entrySet()) { if (COMPONENT_AM.equals(entry.getKey())) { continue; } Map<String, String> options = entry.getValue(); if (COMPONENT_TYPE_EXTERNAL_APP.equals(options.get(COMPONENT_TYPE_KEY))) { externalComponents.add(entry.getKey()); } } return externalComponents; }
private Set<String> getExternalComponents(ConfTreeOperations ops) throws BadConfigException { Set<String> externalComponents = new HashSet<>(); if (ops.getGlobalOptions().containsKey(COMPONENT_TYPE_KEY)) { throw new BadConfigException(COMPONENT_TYPE_KEY + " must be " + "specified per-component, not in global"); } for (Entry<String, Map<String, String>> entry : ops.getComponents() .entrySet()) { if (COMPONENT_AM.equals(entry.getKey())) { continue; } Map<String, String> options = entry.getValue(); if (COMPONENT_TYPE_EXTERNAL_APP.equals(options.get(COMPONENT_TYPE_KEY))) { externalComponents.add(entry.getKey()); } } return externalComponents; }
/** * append to a global option * @param key key * @return value * */ public String append(String key, String value) { if (SliderUtils.isUnset(value)) { return null; } if (globalOptions.containsKey(key)) { globalOptions.put(key, globalOptions.get(key) + "," + value); } else { globalOptions.put(key, value); } return globalOptions.get(key); }
/** * append to a global option * @param key key * @return value * */ public String append(String key, String value) { if (SliderUtils.isUnset(value)) { return null; } if (globalOptions.containsKey(key)) { globalOptions.put(key, globalOptions.get(key) + "," + value); } else { globalOptions.put(key, value); } return globalOptions.get(key); }
/** * append to a component option * @param key key * @return value * */ public String appendComponentOpt(String role, String key, String value) { if (SliderUtils.isUnset(value)) { return null; } MapOperations roleopts = getComponent(role); if (roleopts == null) { return null; } if (roleopts.containsKey(key)) { roleopts.put(key, roleopts.get(key) + "," + value); } else { roleopts.put(key, value); } return roleopts.get(key); } }
/** * append to a component option * @param key key * @return value * */ public String appendComponentOpt(String role, String key, String value) { if (SliderUtils.isUnset(value)) { return null; } MapOperations roleopts = getComponent(role); if (roleopts == null) { return null; } if (roleopts.containsKey(key)) { roleopts.put(key, roleopts.get(key) + "," + value); } else { roleopts.put(key, value); } return roleopts.get(key); } }