private String findPageWithURL()

in src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java [81:104]


    private String findPageWithURL(SiteExporter siteExporter, String url) throws Exception {
        if (siteExporter.getSpace().getURL().endsWith(url)) {
            String prefix = getRelativePath(SiteExporter.rootOutputDir, getPageDirectory(), siteExporter.outputDir);
            String location = prefix + "index.html";
            if (exporter != siteExporter) {
                System.out.println("Cross space link to " + location);
            }
            return location;
        } else {
            AbstractPage p = siteExporter.findPageByURL(url);
            if (p == null) {
                p = siteExporter.findBlogEntryByURL(url);
            }
            if (p != null) {
                String prefix = getRelativePath(SiteExporter.rootOutputDir, getPageDirectory(), siteExporter.outputDir);
                String location = prefix + p.getPath();
                if (exporter != siteExporter) {
                    System.out.println("Cross space link to " + location);
                }
                return location;
            }
        }
        return null;
    }