if (this.hasType(type)) { throw new GroupModifyException("group already has type: " + type); } try { PrivilegeResolver.getInstance().canADMIN(this.s, this, this.s.getSubject()); } catch (InsufficientPrivilegeException eIP) { GrouperLog.debug(LOG, this.s, eIP.getMessage()); throw eIP; }
Validator.canAddGroupType(this.s, this, type);
  public void addType(GroupType type)     throws  GroupModifyException,            InsufficientPrivilegeException  {    if (this.hasType(type)) {      throw new GroupModifyException("group already has type: " + type);    }    try {      PrivilegeResolver.getInstance().canADMIN(this.s, this, this.s.getSubject());    }    catch (InsufficientPrivilegeException eIP) {      GrouperLog.debug(LOG, this.s, eIP.getMessage());      throw eIP;    }    try {      StopWatch sw    = new StopWatch();      Session   hs    = HibernateHelper.getSession();      Set       types = this.getGroup_types();      types.add(type);      this.setGroup_types(types);      HibernateHelper.save(this);      hs.close();      sw.stop();      EL.groupAddType(this.s, this.getName(), type, sw);    }    catch (Exception e) {      String msg = "unable to add type: " + type + ": " + e.getMessage();      LOG.error(msg);      throw new GroupModifyException(msg);     }  } // public void addType(type)