@Override public void afterAdd(ScientificCommission commission, Person person) { super.afterAdd(commission, person); if (person != null && commission != null) { person.addPersonRoleByRoleType(RoleType.COORDINATOR); } }
@Override public void afterRemove(ScientificCommission commission, Person person) { super.afterRemove(commission, person); if (person != null && commission != null) { if (person.hasAnyCoordinators()) { return; } if (person.hasAnyScientificCommissions()) { return; } person.removeRoleByType(RoleType.COORDINATOR); } }