public Response makeResponse(FitNesseContext context, Request request) { response = new SimpleResponse(); resource = request.getResource(); path = PathParser.parse(resource); PageCrawler crawler = context.root.getPageCrawler(); page = crawler.getPage(path, new MockingPageCrawler()); if (page == null) return new NotFoundResponder().makeResponse(context, request); pageData = page.getData(); makeContent(context, request); response.setMaxAge(0); return response; }
private String makePathForSymbolicLink(String linkPath) { WikiPagePath wikiPagePath = PathParser.parse(linkPath); if (wikiPagePath != null) { WikiPage parent = wikiPagePath.isRelativePath() ? page.getParent() : page; PageCrawler crawler = parent.getPageCrawler(); WikiPage target = crawler.getPage(wikiPagePath); WikiPagePath fullPath; if (target != null) { fullPath = target.getPageCrawler().getFullPath(); fullPath.makeAbsolute(); } else fullPath = new WikiPagePath(); return fullPath.toString(); } return null; }