code: public void writeGroup(CmsRequestContext context, CmsGroup group) throws CmsException, CmsRoleViolationException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkRole(dbc, CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalUnit(group.getName())));
              m_driverManager.writeGroup(dbc, group);
          } catch (Exception e) {
              dbc.report(null, Messages.get().container(Messages.ERR_WRITE_GROUP_1, group.getName()), e);
          } finally {
              dbc.clear();
          }
      }
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 context the current request context
  @param group the group that should be written
  
  @throws CmsRoleViolationException if the current user does not own the role {@link CmsRole#ACCOUNT_MANAGER} for the current project
  @throws CmsException if operation was not successful