docs: private String getRootPath(Object resource) {
  
          if (resource instanceof CmsResource) {
              return ((CmsResource)resource).getRootPath();
          }
          if (resource instanceof CmsPublishedResource) {
              return ((CmsPublishedResource)resource).getRootPath();
          }
          throw new IllegalArgumentException("wrong format of resources"); //should never happen
      }