code: protected CmsContainerConfiguration createConfigurationBean(
          boolean newOrdering,
          List<CmsContainerElementBean> elements,
          Set<String> parentKeys) {
  
          Map<String, CmsContainerElementBean> newElements = new HashMap<String, CmsContainerElementBean>();
          List<String> ordering = new ArrayList<String>();
          Map<String, Boolean> visibility = new HashMap<String, Boolean>();
          for (CmsContainerElementBean elementBean : elements) {
              CmsInheritanceInfo info = elementBean.getInheritanceInfo();
              if (info.isNew()) {
                  newElements.put(info.getKey(), elementBean);
              }
          }
          if (newOrdering) {
              for (CmsContainerElementBean elementBean : elements) {
                  CmsInheritanceInfo info = elementBean.getInheritanceInfo();
                  // remove dangling element references
                  if (parentKeys.contains(info.getKey()) || newElements.containsKey(info.getKey())) {
                      ordering.add(info.getKey());
                  }
              }
          }
          for (CmsContainerElementBean elementBean : elements) {
              CmsInheritanceInfo info = elementBean.getInheritanceInfo();
              if (info.isVisible() != info.isParentVisible()) {
                  visibility.put(info.getKey(), new Boolean(info.isVisible()));
              }
          }
  
          CmsContainerConfiguration configuration = new CmsContainerConfiguration(ordering, visibility, newElements);
          return configuration;
      }
docs: Converts a list of container elements into a bean which should be saved to the inherited container configuration.<p>
  
  @param newOrdering if true, save a new ordering
  @param elements the elements which should be converted
  @param parentKeys the keys for new elements defined in the parent configurations
  
  @return the bean containing the information from the container elements which should be saved