code: public static CmsContainerElementBean cloneWithSettings(
          CmsContainerElementBean source,
          Map<String, String> settings) {
  
          boolean createNew = source.m_createNew;
          if (settings.containsKey(CmsContainerElement.CREATE_AS_NEW)) {
              createNew = Boolean.valueOf(settings.get(CmsContainerElement.CREATE_AS_NEW)).booleanValue();
              settings = new HashMap<String, String>(settings);
              settings.remove(CmsContainerElement.CREATE_AS_NEW);
          }
          CmsContainerElementBean result = new CmsContainerElementBean(
              source.m_elementId,
              source.m_formatterId,
              settings,
              createNew);
          result.m_resource = source.m_resource;
          result.m_sitePath = source.m_sitePath;
          result.m_inMemoryOnly = source.m_inMemoryOnly;
          result.m_inheritanceInfo = source.m_inheritanceInfo;
          if (result.m_inMemoryOnly) {
              String editorHash = source.m_editorHash;
              if (editorHash.contains(CmsADEManager.CLIENT_ID_SEPERATOR)) {
                  editorHash = editorHash.substring(0, editorHash.indexOf(CmsADEManager.CLIENT_ID_SEPERATOR));
              }
              editorHash += result.getSettingsHash();
              result.m_editorHash = editorHash;
          }
          return result;
      }
docs: Clones the given element bean with a different set of settings.<p>
  
  @param source the element to clone
  @param settings the new settings
  
  @return the element bean