boolean nameChanged = false;
try {
nameChanged = validate(groupDefinition, groupDefinition.getId());
} catch (GroupDefinitionException gde) {
throw new GroupDefinitionUpdateException(gde.getMessage());
}
RecursivityChangeType changeType = RecursivityChangeType.None;
GroupDefinition attachedGroupDefinition = null;
try {
attachedGroupDefinition = getById(groupDefinition.getId());
} catch (GroupDefinitionNotFoundException gdnfe) {
throw new GroupDefinitionUpdateException(gdnfe.getMessage());
}
if (groupDefinition.isRecursive() == true && attachedGroupDefinition.isRecursive() == false) {
// making a recursive group into a "normal" group
changeType = RecursivityChangeType.AddedRecursion;
} else if (groupDefinition.isRecursive() == false && attachedGroupDefinition.isRecursive() == true) {