code: public void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsException {
  
          CmsGroup oldGroup = readGroup(dbc, group.getName());
          m_monitor.uncacheGroup(oldGroup);
          getUserDriver(dbc).writeGroup(dbc, group);
          m_monitor.cacheGroup(group);
  
          if (!dbc.getProjectId().isNullUUID()) {
              // group modified event is not needed
              return;
          }
          // fire group modified event
          Map<String, Object> eventData = new HashMap<String, Object>();
          eventData.put(I_CmsEventListener.KEY_GROUP_ID, group.getId().toString());
          eventData.put(I_CmsEventListener.KEY_GROUP_NAME, oldGroup.getName());
          eventData.put(I_CmsEventListener.KEY_USER_ACTION, I_CmsEventListener.VALUE_GROUP_MODIFIED_ACTION_WRITE);
          OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_GROUP_MODIFIED, eventData));
      }
docs: Writes an already existing group.<p>
  
  The group id has to be a valid OpenCms group id.<br>
  
  The group with the given id will be completely overridden
  by the given data.<p>
  
  @param dbc the current database context
  @param group the group that should be written
  
  @throws CmsException if operation was not successful