funcRemoved = false;
continue; // role still exists
}
}
if (funcRemoved) {
RoleItemKey rik = new RoleItemKey(role.getId(), ori.getFunc(), ori.getSys(), ori.getRevNo());
deleteItem(rik, cra);
it.remove();
}
}
for (RoleItem ri : funcs) {
boolean funcAdded = true;
for (RoleItem ori : oldFuncs) {
if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
funcAdded = false;
continue; // role still exists
}
}
if (funcAdded) {
ri.setRoleId(role.getId());
RoleItemKey uk = insertItem(ri, cra);
if (uk == null) {
ApplicationException.exception(
CommonMessageID.SERVICE_FAILURE.getMessage());
return;
}