Example #1
0
    @Override
    public void afterAdd(ScientificCommission commission, Person person) {
      super.afterAdd(commission, person);

      if (person != null && commission != null) {
        person.addPersonRoleByRoleType(RoleType.COORDINATOR);
      }
    }
Example #2
0
    @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);
      }
    }