code: public void addConfigurations(CmsContainerConfigurationCache cache, String rootPath, String name) {
  
          String currentPath = rootPath;
          List<CmsContainerConfiguration> configurations = new ArrayList<CmsContainerConfiguration>();
          CmsContainerConfigurationCacheState state = cache.getState();
          while (currentPath != null) {
              CmsContainerConfiguration configuration = state.getContainerConfiguration(currentPath, name);
              if (configuration == null) {
                  configuration = CmsContainerConfiguration.emptyConfiguration();
              }
              configuration.setPath(currentPath);
              configurations.add(configuration);
              currentPath = CmsResource.getParentFolder(currentPath);
          }
          Collections.reverse(configurations);
          for (CmsContainerConfiguration configuration : configurations) {
              if (configuration != null) {
                  addConfiguration(configuration);
              }
          }
      }
docs: Reads the configurations for a root path and its parents from a cache instance and adds them to this state.<p>
  
  @param cache the cache instance
  @param rootPath the root path
  @param name the name of the container configuration