if (newName == null) {
throw new ValidationException("Procedure name is required.");
}
else if (procedure.getDataMap().getProcedure(newName) == null) {
// completely new name, set new name for entity
ProcedureEvent e = new ProcedureEvent(this, procedure, procedure.getName());
ProjectUtil.setProcedureName(procedure.getDataMap(), procedure, newName);
eventController.fireProcedureEvent(e);
}
else {
// there is an entity with the same name