private Response makePageHistoryResponse(Request request) {
   page.setTitle("Page History");
   page.put("pageHistory", pageHistory);
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.setMainTemplate("pageHistory");
   return makeResponse();
 }
 private Response generateHtmlTestExecutionResponse(Request request, TestExecutionReport report)
     throws Exception {
   page.setTitle("Test Execution Report");
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.put("testExecutionReport", report);
   page.put("ExecutionResult", ExecutionResult.class);
   page.setMainTemplate("testExecutionReport");
   page.setErrorNavTemplate("errorNavigator");
   page.put("errorNavOnDocumentReady", true);
   return makeResponse();
 }
 private Response generateHtmlSuiteExecutionResponse(Request request, SuiteExecutionReport report)
     throws Exception {
   page.setTitle("Suite Execution Report");
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.put("suiteExecutionReport", report);
   page.put("ExecutionResult", ExecutionResult.class);
   page.setMainTemplate("suiteExecutionReport");
   return makeResponse();
 }
  private void prepareResponse(Request request) {
    response = new SimpleResponse();
    if (resultsDirectory == null) resultsDirectory = context.getTestHistoryDirectory();
    history = new TestHistory();
    pageName = request.getResource();
    history.readPageHistoryDirectory(resultsDirectory, pageName);
    pageHistory = history.getPageHistory(pageName);
    page = context.pageFactory.newPage();

    String tags = "";
    if (context.root != null) {
      WikiPagePath path = PathParser.parse(pageName);
      PageCrawler crawler = context.root.getPageCrawler();
      WikiPage wikiPage = crawler.getPage(path);
      if (wikiPage != null) {
        PageData pageData = wikiPage.getData();
        tags = pageData.getAttribute(PageData.PropertySUITES);
      }
    }

    pageTitle = new PageTitle("Test History", PathParser.parse(request.getResource()), tags);
    page.setPageTitle(pageTitle);
  }
 private Response makeResponse() {
   response.setContent(page.html());
   return response;
 }