String msg = "subject not privileged to add group types"; LOG.error(msg);
String msg = E.GROUPTYPE_NOADD; ErrorLog.error(GroupType.class, msg);
  public static GroupType createType(GrouperSession s, String name)     throws  InsufficientPrivilegeException,            SchemaException  {    GroupType type  = null;    StopWatch sw    = new StopWatch();    sw.start();    if (!PrivilegeResolver.getInstance().isRoot(s.getSubject())) {      String msg = "subject not privileged to add group types";      LOG.error(msg);      throw new InsufficientPrivilegeException(msg);    }    try {      type = GroupTypeFinder.find(name);        // type already exists.      }    catch (SchemaException eS) {      // Ignore    }     if (type != null) {      String msg = "type already exists: " + name;      LOG.error(msg);      throw new SchemaException(msg);    }    try {      type = new GroupType(name, new HashSet(), true, false);      type.setCreator_id(   s.getMember()         );      type.setCreate_time(  new Date().getTime()  );      HibernateHelper.save(type);      sw.stop();      EL.groupTypeAdd(s, name, sw);      return type;    }    catch (HibernateException eH) {      String msg = "unable to add type: " + name + ": " + eH.getMessage();      LOG.error(msg);      throw new SchemaException(msg, eH);    }  } // public static GroupType createType(s, name)