code: public CmsInheritedContainerState getInheritedContainerState(CmsObject cms, String rootPath, String name)
      throws CmsException {
  
          String oldSiteRoot = cms.getRequestContext().getSiteRoot();
          try {
              cms.getRequestContext().setSiteRoot("");
              CmsResource resource = cms.readResource(rootPath);
              return getInheritedContainerState(cms, resource, name);
          } finally {
              cms.getRequestContext().setSiteRoot(oldSiteRoot);
          }
      }
docs: Returns the inheritance state for the given inheritance name and root path.<p>
  
  @param cms the current cms context
  @param rootPath the root path
  @param name the inheritance name
  
  @return the inheritance state
  
  @throws CmsException if something goes wrong