catch (Exception e) { throw new GroupAddException( "group created but unable to grant ADMIN to creator: " + e.getMessage(), e );
catch (GrantPrivilegeException eGP)         { throw new GroupAddException(eGP.getMessage(), eGP); } catch (InsufficientPrivilegeException eIP)  { throw new GroupAddException(eIP.getMessage(), eIP); } catch (SchemaException eS)                  { throw new GroupAddException(eS.getMessage(), eS);
  private void _grantDefaultPrivsUponCreate(Group g)    throws  GroupAddException  {    // Now grant ADMIN (as root) to the creator of the child group.    //    // Ideally this would be wrapped up in the broader transaction    // of adding the child stem but as the interfaces may be    // outside of our control, I don't think we can do that.      //    // TODO Unfortunately this sets the modify* attrs    try {      GrouperSession  orig  = this.s;      GrouperSession  root  = orig.getRootSession();      g.setSession(root);      PrivilegeResolver.grantPriv(root, g, orig.getSubject(), AccessPrivilege.ADMIN);      // Now optionally grant other privs      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.ADMIN  , GrouperConfig.GCGAA      );      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.OPTIN  , GrouperConfig.GCGAOI      );      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.OPTOUT , GrouperConfig.GCGAOO      );      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.READ   , GrouperConfig.GCGAR      );      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.UPDATE , GrouperConfig.GCGAU      );      this._grantOptionalPrivUponCreate(        root, g, AccessPrivilege.VIEW   , GrouperConfig.GCGAV      );      g.setSession(orig);    }    catch (Exception e) {      throw new GroupAddException(        "group created but unable to grant ADMIN to creator: " + e.getMessage(), e      );    }  } // private void _grantDefaultPrivsUponCreate(g)