code: private String getCommonAncestorPath(Collection<CmsResource> resources) {
  
          if (resources.isEmpty()) {
              return "/";
          }
          String commonPath = null;
          for (CmsResource resource : resources) {
              commonPath = getCommonAncestorPath(commonPath, resource.getRootPath());
          }
          return commonPath;
      }
docs: Gets the common ancestor path of a collection of resources.<p>
  
  @param resources the resources for which to get the ancestor path
  
  @return the common ancestor path for the resources