docs: public synchronized void initialize(CmsObject cms) throws CmsException, CmsRoleViolationException {
  
          try {
              // ensure that the current user has permissions to initialize the workplace
              OpenCms.getRoleManager().checkRole(cms, CmsRole.WORKPLACE_MANAGER);
  
              // set the workplace encoding
              try {
                  // workplace encoding is set on the workplace parent folder /system/workplace/
                  CmsResource wpFolderRes = cms.readResource(CmsWorkplace.VFS_PATH_WORKPLACE);
                  m_encoding = CmsLocaleManager.getResourceEncoding(cms, wpFolderRes);
              } catch (CmsVfsResourceNotFoundException e) {
                  // workplace parent folder could not be read - use configured default encoding
                  m_encoding = OpenCms.getSystemInfo().getDefaultEncoding();
              }
  
              // configure direct edit provider with default if not available
              if (m_directEditProvider == null) {
                  m_directEditProvider = new CmsDirectEditDefaultProvider();
              }
  
              // throw away all currently configured module explorer types
              m_explorerTypeSettingsFromModules.clear();
              // now add the additional explorer types found in the modules
              CmsModuleManager moduleManager = OpenCms.getModuleManager();
              Iterator<String> moduleNameIterator = moduleManager.getModuleNames().iterator();
              while (moduleNameIterator.hasNext()) {
                  CmsModule module = moduleManager.getModule(moduleNameIterator.next());
                  if (module != null) {
                      addExplorerTypeSettings(module);
                  }
              }
              // initialize the explorer type settings
              initExplorerTypeSettings();
              // initialize the workplace views
              initWorkplaceViews(cms);
              // initialize the workplace editor manager
              m_editorManager = new CmsWorkplaceEditorManager(cms);
              // initialize the locale handler
              initHandler(cms);
  
              if (CmsLog.INIT.isInfoEnabled()) {
                  CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ACCESS_INITIALIZED_0));
              }
              try {
                  // read the temporary file project
                  m_tempFileProject = cms.readProject(I_CmsProjectDriver.TEMP_FILE_PROJECT_NAME);
              } catch (CmsException e) {
                  // during initial setup of OpenCms the temp file project does not yet exist...
                  LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_TEMP_FILE_PROJECT_0));
              }
              // create an instance of editor display options
              m_editorDisplayOptions = new CmsEditorDisplayOptions();
  
              // throw away all current gallery settings
              m_galleries.clear();
              // read out the configured gallery classes
              Iterator<I_CmsResourceType> typesIterator = OpenCms.getResourceManager().getResourceTypes().iterator();
              while (typesIterator.hasNext()) {
                  I_CmsResourceType resourceType = typesIterator.next();
                  if (resourceType instanceof CmsResourceTypeFolderExtended) {
                      // found a configured extended folder resource type
                      CmsResourceTypeFolderExtended galleryType = (CmsResourceTypeFolderExtended)resourceType;
                      String folderClassName = galleryType.getFolderClassName();
                      if (CmsStringUtil.isNotEmpty(folderClassName)) {
                          // only process this as a gallery if the folder name is not empty
                          try {
                              // check, if the folder class is a subclass of A_CmsGallery
                              if (A_CmsAjaxGallery.class.isAssignableFrom(Class.forName(folderClassName))) {
                                  // create gallery class instance
                                  A_CmsAjaxGallery galleryInstance = (A_CmsAjaxGallery)Class.forName(
                                      folderClassName).newInstance();
                                  // set gallery folder resource type
                                  galleryInstance.setResourceType(galleryType);
                                  // store the gallery class instance with the type name as lookup key
                                  m_galleries.put(galleryType.getTypeName(), galleryInstance);
                              }
                          } catch (ClassNotFoundException e) {
                              LOG.error(e.getLocalizedMessage());
                          } catch (InstantiationException e) {
                              LOG.error(e.getLocalizedMessage());
                          } catch (IllegalAccessException e) {
                              LOG.error(e.getLocalizedMessage());
                          }
                      }
                  }
              }
  
              getDefaultUserSettings().initPreferences(this);
  
              // configures the tool manager
              getToolManager().configure(cms);
  
              flushMessageCache();
  
              // register this object as event listener
              OpenCms.addCmsEventListener(this, new int[] {I_CmsEventListener.EVENT_CLEAR_CACHES});
          } catch (CmsException e) {
              if (LOG.isErrorEnabled()) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
              throw new CmsException(Messages.get().container(Messages.ERR_INITIALIZE_WORKPLACE_0));
          }
          m_adminCms = cms;
      }