docs: public CmsContainerElement setElementInfo(CmsContainerElementBean elementBean, CmsContainerElement result)
      throws CmsException {
  
          Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
          // reinitializing resource to avoid caching issues
          elementBean.initResource(m_cms);
          CmsResource resource = elementBean.getResource();
          boolean isModelGroup = elementBean.getIndividualSettings().containsKey(CmsContainerElement.MODEL_GROUP_ID);
          if (isModelGroup) {
              CmsUUID groupId = new CmsUUID(elementBean.getIndividualSettings().get(CmsContainerElement.MODEL_GROUP_ID));
              resource = m_cms.readResource(groupId, CmsResourceFilter.IGNORE_EXPIRATION);
          }
  
          boolean newEditorDisabled = !CmsWorkplaceEditorManager.checkAcaciaEditorAvailable(
              m_cms,
              elementBean.getResource());
          result.setNewEditorDisabled(newEditorDisabled);
          I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(resource);
          String typeName = resourceType.getTypeName();
          result.setHasEditHandler(
              (resourceType instanceof CmsResourceTypeXmlContent)
                  && (((CmsResourceTypeXmlContent)resourceType).getEditHandler(m_cms) != null));
          result.setResourceType(typeName);
          result.setIconClasses(
              CmsIconUtil.getIconClasses(
                  CmsIconUtil.getDisplayType(m_cms, resource),
                  elementBean.getResource().getName(),
                  false));
          CmsPermissionInfo permissionInfo;
          String title;
          String subTitle;
          if (!elementBean.isInMemoryOnly()) {
              permissionInfo = OpenCms.getADEManager().getPermissionInfo(m_cms, resource, m_page.getRootPath());
              if (CmsResourceTypeXmlContent.isXmlContent(resource)) {
                  if (CmsStringUtil.isEmptyOrWhitespaceOnly(permissionInfo.getNoEditReason())
                      && elementBean.isInheritedContainer(m_cms)) {
                      String requestUri = m_cms.getRequestContext().getUri();
                      String folderPath = CmsResource.getFolderPath(requestUri);
                      String configPath = CmsStringUtil.joinPaths(
                          folderPath,
                          CmsContainerConfigurationCache.INHERITANCE_CONFIG_FILE_NAME);
                      if (m_cms.existsResource(configPath)) {
                          permissionInfo.setNoEditReason(
                              new CmsResourceUtil(m_cms, m_cms.readResource(configPath)).getNoEditReason(wpLocale, true));
                      } else {
                          if (!m_cms.getLock(folderPath).isLockableBy(m_cms.getRequestContext().getCurrentUser())) {
                              permissionInfo.setNoEditReason(
                                  org.opencms.workplace.explorer.Messages.get().getBundle(wpLocale).key(
                                      org.opencms.workplace.explorer.Messages.GUI_NO_EDIT_REASON_LOCK_1,
                                      new CmsResourceUtil(m_cms, m_cms.readResource(folderPath)).getLockedByName()));
                          }
                      }
                  }
              } else {
                  permissionInfo.setNoEditReason(
                      Messages.get().getBundle(wpLocale).key(Messages.GUI_ELEMENT_RESOURCE_CAN_NOT_BE_EDITED_0));
              }
              CmsGallerySearchResult searchResult = CmsGallerySearch.searchById(
                  m_cms,
                  resource.getStructureId(),
                  m_locale);
              title = searchResult.getTitle();
              if (CmsStringUtil.isEmptyOrWhitespaceOnly(title)) {
                  resource.getName();
              }
              subTitle = searchResult.getUserLastModified();
              Date lastModDate = searchResult.getDateLastModified();
              if (lastModDate != null) {
                  subTitle += " / " + CmsDateUtil.getDateTime(lastModDate, DateFormat.MEDIUM, wpLocale);
              }
          } else {
              permissionInfo = new CmsPermissionInfo(true, true, "");
              title = CmsWorkplaceMessages.getResourceTypeName(wpLocale, typeName);
              subTitle = CmsWorkplaceMessages.getResourceTypeDescription(wpLocale, typeName);
          }
          result.setTitle(title);
          result.setSubTitle(subTitle);
          result.setClientId(elementBean.editorHash());
          result.setSitePath(m_cms.getSitePath(resource));
  
          result.setCreateNew(elementBean.isCreateNew());
          CmsResourceTypeConfig typeConfig = getConfigData().getResourceType(typeName);
          if (typeConfig != null) {
              result.setCopyInModels(typeConfig.isCopyInModels());
          }
          Map<CmsUUID, CmsElementView> viewMap = OpenCms.getADEManager().getElementViews(m_cms);
  
          boolean isModelGroupEditing = CmsModelGroupHelper.isModelGroupResource(m_page);
          if (!isModelGroup
              && isModelGroupEditing
              && elementBean.getIndividualSettings().containsKey(CmsContainerElement.MODEL_GROUP_STATE)
              && (ModelGroupState.isModelGroup == ModelGroupState.evaluate(
                  elementBean.getIndividualSettings().get(CmsContainerElement.MODEL_GROUP_STATE)))) {
              isModelGroup = true;
          }
          if (!isModelGroupEditing && isModelGroup) {
              CmsResourceTypeConfig modelGroupConfig = getConfigData().getResourceType(
                  CmsResourceTypeXmlContainerPage.MODEL_GROUP_TYPE_NAME);
              if (modelGroupConfig != null) {
                  CmsUUID elementView = modelGroupConfig.getElementView();
                  CmsElementView viewObject = viewMap.get(elementView);
                  if ((viewObject != null) && (viewObject.getParentViewId() != null)) {
                      elementView = viewObject.getParentViewId();
                  }
                  result.setElementView(elementView);
              }
          } else if (typeConfig != null) {
              CmsUUID elementView = typeConfig.getElementView();
              CmsElementView viewObject = viewMap.get(elementView);
              if ((viewObject != null) && (viewObject.getParentViewId() != null)) {
                  elementView = viewObject.getParentViewId();
              }
              result.setElementView(elementView);
          }
          if (elementBean.isCreateNew()
              && CmsStringUtil.isEmptyOrWhitespaceOnly(permissionInfo.getNoEditReason())
              && ((typeConfig == null)
                  || !typeConfig.checkCreatable(m_cms, CmsResource.getParentFolder(m_page.getRootPath())))) {
              String niceName = CmsWorkplaceMessages.getResourceTypeName(wpLocale, typeName);
              permissionInfo.setNoEditReason(
                  Messages.get().getBundle(wpLocale).key(Messages.GUI_CONTAINERPAGE_TYPE_NOT_CREATABLE_1, niceName));
          }
          result.setHasSettings(hasSettings(m_cms, elementBean.getResource()));
          result.setPermissionInfo(permissionInfo);
          result.setReleasedAndNotExpired(elementBean.isReleasedAndNotExpired());
          if (elementBean.isModelGroup()) {
              String modelId = elementBean.getIndividualSettings().get(CmsContainerElement.MODEL_GROUP_ID);
              result.setModelGroupId(modelId != null ? new CmsUUID(modelId) : CmsUUID.getNullUUID());
          }
          result.setWasModelGroup(
              elementBean.getIndividualSettings().containsKey(CmsContainerElement.MODEL_GROUP_STATE)
                  && (ModelGroupState.evaluate(
                      elementBean.getIndividualSettings().get(
                          CmsContainerElement.MODEL_GROUP_STATE)) == ModelGroupState.wasModelGroup));
          return result;
      }