if (!g.hasType( f.getGroupType() ) ) { String err = "does not have group type: " + f.getGroupType().toString(); GrouperLog.debug(LOG, s, err); throw new SchemaException(err); }
  protected void canWriteField(    GrouperSession s, Group g, Subject subj, Field f, FieldType type  )    throws  InsufficientPrivilegeException,            SchemaException  {    GrouperSession.validate(s);    String msg = "canWriteField '" + f + "' '" + type + "'";    GrouperLog.debug(LOG, s, msg);    // Validate field type    if (f.getType().equals(type)) {      GrouperLog.debug(LOG, s, msg + " right type");    }    else {      String err = f.getName() + " is not type " + type;      GrouperLog.debug(LOG, s, err);      throw new SchemaException(err);    }    try {      PrivilegeResolver.getInstance().canPrivDispatch(        s, g, subj, f.getWritePriv()      );    }    catch (InsufficientPrivilegeException eIP) {      GrouperLog.debug(LOG, s, eIP.getMessage());      throw new InsufficientPrivilegeException(eIP.getMessage());    }  } // protected static void canWriteField(s, g, subj, f, type)