@Atomic
public static void run(DegreeCurricularPlan degreeCurricularPlan, String[] add, String[] remove) {
check(RolePredicates.SCIENTIFIC_COUNCIL_PREDICATE);
Group original = degreeCurricularPlan.getCurricularPlanMembersGroup();
Group changed = original;
if (add != null) {
for (String personID : add) {
Person person = FenixFramework.getDomainObject(personID);
changed = changed.grant(person.getUser());
}
}
if (remove != null) {
for (String personID : remove) {
Person person = FenixFramework.getDomainObject(personID);
changed = changed.revoke(person.getUser());
}
}
updateBolonhaManagerRoleToGroupDelta(degreeCurricularPlan, original, changed);
degreeCurricularPlan.setCurricularPlanMembersGroup(changed);