private PatchParams createNewGroup(String path) {
LOG.info("Creating group " + path);
String[] split = path.split("/");
String tempPath = null;
PatchParams parentGroup = null;
for (int i = 0; i < split.length - 1; i++) {
String groupName = split[i];
if (tempPath == null) {
tempPath = groupName;
} else {
tempPath = tempPath + "/" + groupName;
}
if (groupMap.containsKey(tempPath)) {
parentGroup = groupMap.get(tempPath);
} else {
parentGroup = createNewGroup(tempPath);
}
}
PatchParamGroup paramGroup = parentGroup.addNewPatchParamGroup();
paramGroup.setName(split[split.length - 1]);
groupMap.put(path, paramGroup);
return paramGroup;
}