code: public void writeOrganizationalUnit(CmsRequestContext context, CmsOrganizationalUnit organizationalUnit)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkRole(dbc, CmsRole.ADMINISTRATOR.forOrgUnit(organizationalUnit.getName()));
              checkOfflineProject(dbc);
              m_driverManager.writeOrganizationalUnit(dbc, organizationalUnit);
          } catch (Exception e) {
              dbc.report(null, Messages.get().container(Messages.ERR_WRITE_ORGUNIT_1, organizationalUnit.getName()), e);
          } finally {
              dbc.clear();
          }
      }
docs: Writes an already existing organizational unit.<p>
  
  The organizational unit id has to be a valid OpenCms organizational unit id.<p>
  
  The organizational unit with the given id will be completely overridden
  by the given data.<p>
  
  @param context the current request context
  @param organizationalUnit the organizational unit that should be written
  
  @throws CmsException if operation was not successful
  
  @see org.opencms.security.CmsOrgUnitManager#writeOrganizationalUnit(CmsObject, CmsOrganizationalUnit)