Package fitnesse.wiki

Examples of fitnesse.wiki.PageCrawler


    version = (String) request.getInput("version");
    this.context = context;
    if (version == null)
      return new ErrorResponder("No version specified.").makeResponse(context, request);

    PageCrawler pageCrawler = context.root.getPageCrawler();
    WikiPagePath path = PathParser.parse(resource);
    WikiPage page = pageCrawler.getPage(path);
    if (page == null)
      return new NotFoundResponder().makeResponse(context, request);

    String fullPathName = PathParser.render(page.getPageCrawler().getFullPath());
    HtmlPage html = makeHtml(fullPathName, page, context, request);
View Full Code Here


  @Override
  public Response makeResponse(FitNesseContext context, Request request)
      throws Exception {
    String resource = request.getResource();
    PageCrawler pageCrawler = context.root.getPageCrawler();
    WikiPagePath path = PathParser.parse(resource);
    WikiPage page = pageCrawler.getPage(path);
    if (page == null)
      return new NotFoundResponder().makeResponse(context, request);

    this.context = context;
    getVersionsFromRequest(request);
View Full Code Here

    HtmlPage html = context.pageFactory.newPage();
   
    String tags = "";
    if(context.root!=null){
      WikiPagePath path = PathParser.parse(qualifiedPageName);
      PageCrawler crawler = context.root.getPageCrawler();
      WikiPage wikiPage = crawler.getPage(path);
      if(wikiPage != null) {
        PageData pageData = wikiPage.getData();
        tags = pageData.getAttribute(PageData.PropertySUITES);
      }
    }
View Full Code Here

  private PageTitle makePageTitle(String resource) {

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

  }

  public Response makeResponse(FitNesseContext context, Request request) throws IOException {
    resource = request.getResource();
    this.context = context;
    PageCrawler crawler = context.root.getPageCrawler();
    page = crawler.getPage(PathParser.parse(resource));
    if (page == null)
      return new NotFoundResponder().makeResponse(context, request);

    response = new SimpleResponse();
    if (request.hasInput("removal"))
View Full Code Here

 
  private boolean afterStartingTest(WikiPage testPage) {
    if (startWithTest == null) {
      return true;
    }
    PageCrawler crawler = testPage.getPageCrawler();
    WikiPagePath pageName = crawler.getFullPath();
    return (pageName.toString().compareTo(startWithTest) >= 0);
  }
View Full Code Here

        this.wikiWordPath = makePath(currentPage, pagePath);
        this.qualifiedName = currentPage.makeFullPathOfTarget(wikiWordPath);
    }

    public static String expandPrefix(WikiPage wikiPage, String theWord) {
      PageCrawler crawler = wikiPage.getPageCrawler();
      if (theWord.charAt(0) == '^' || theWord.charAt(0) == '>') {
        String prefix = wikiPage.getName();
        return String.format("%s.%s", prefix, theWord.substring(1));
      } else if (theWord.charAt(0) == '<') {
        String undecoratedPath = theWord.substring(1);
View Full Code Here

    initializeResponder(context.root, request);

    SimpleResponse response = new SimpleResponse();
    String resource = request.getResource();
    WikiPagePath path = PathParser.parse(resource);
    PageCrawler crawler = context.root.getPageCrawler();

    page = crawler.getPage(path, new MockingPageCrawler());
    pageData = page.getData();
    content = createPageContent();

    String html = doMakeHtml(resource, context, firstTimeForNewPage);
View Full Code Here

    data.setContent(mockContent);
    localPage.commit(data);
  }

  public void importWiki(WikiPage page) {
    PageCrawler pageCrawler = page.getPageCrawler();
    for (Iterator<?> iterator = page.getChildren().iterator(); iterator.hasNext();) {
      WikiPage next = (WikiPage) iterator.next();
      next.getPageCrawler().traverse(this);
    }
  }
View Full Code Here

  private PageTitle makePageTitle(String resource) {

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

TOP

Related Classes of fitnesse.wiki.PageCrawler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.