code: public CmsInheritedContainerState getInheritedContainerState(CmsObject cms, CmsResource resource, String name) {
  
          String rootPath = resource.getRootPath();
          if (!resource.isFolder()) {
              rootPath = CmsResource.getParentFolder(rootPath);
          }
          CmsInheritedContainerState result = new CmsInheritedContainerState();
          boolean online = isOnline(cms);
          CmsContainerConfigurationCache cache = online
          ? m_onlineContainerConfigurationCache
          : m_offlineContainerConfigurationCache;
          result.addConfigurations(cache, rootPath, name);
          return result;
  
      }
docs: Returns the inheritance state for the given inheritance name and resource.<p>
  
  @param cms the current cms context
  @param resource the resource
  @param name the inheritance name
  
  @return the inheritance state