code: private List<CmsContainerBean> collectModelStructure(
          String modelInstanceId,
          String replaceModelId,
          Map<String, List<CmsContainerBean>> containerByParent,
          boolean isCopyGroup) {
  
          List<CmsContainerBean> result = new ArrayList<CmsContainerBean>();
  
          if (containerByParent.containsKey(modelInstanceId)) {
              for (CmsContainerBean container : containerByParent.get(modelInstanceId)) {
                  String adjustedContainerName = replaceModelId + container.getName().substring(modelInstanceId.length());
  
                  List<CmsContainerElementBean> elements = new ArrayList<CmsContainerElementBean>();
                  for (CmsContainerElementBean element : container.getElements()) {
                      CmsContainerElementBean copyElement = adjustSettings(
                          element,
                          container.getName(),
                          adjustedContainerName,
                          isCopyGroup);
                      if (m_sessionCache != null) {
                          m_sessionCache.setCacheContainerElement(copyElement.editorHash(), copyElement);
                      }
                      elements.add(copyElement);
                      result.addAll(
                          collectModelStructure(
                              element.getInstanceId(),
                              copyElement.getInstanceId(),
                              containerByParent,
                              isCopyGroup));
                  }
  
                  result.add(
                      new CmsContainerBean(
                          adjustedContainerName,
                          container.getType(),
                          replaceModelId,
                          container.isRootContainer(),
                          container.getMaxElements(),
                          elements));
              }
          }
          return result;
      }
docs: Collects the model group structure.<p>
  
  @param modelInstanceId the model instance id
  @param replaceModelId the local instance id
  @param containerByParent the model group page containers by parent instance id
  @param isCopyGroup <code>true</code> in case of a copy group
  
  @return the collected containers