Package org.stringtree.finder

Examples of org.stringtree.finder.FetcherStringFinder


    context = new TestRequestContext(repos, method, uri);
    output = new TestOutputCollector(context);
     application = context.getObject(MojasefConstants.HTTP_APPLICATION);

    output.start();
      Mojasef.delegateAndExpand(output, new FetcherStringFinder(context), application, Code404.code404);
    output.finish();
   
    return result();
  }
View Full Code Here


    if (page == null) {
        page = new MapTract("Oops, 404: ${mojasef.request.path.URI}");
        StorerHelper.put(context, HTTPConstants.RESPONSE_CODE, "404");
    }

    StringFinder result = new FetcherStringFinder(
        new FallbackFetcher(page.getUnderlyingFetcher(), context.getUnderlyingFetcher()));
    Tract template = findTemplate(result);
    engine.expandTemplate(context, template, collector);
    collector.flush();
  }
View Full Code Here

  CommonContext context;
  StringFinder finder;
 
  public void setUp() {
    context = new RemoteSpecCommonContext((URL)null);
    finder = new FetcherStringFinder(context);
  }
View Full Code Here

    Map<String, Object> map = new HashMap<String, Object>();
 
  public void setUp() throws IOException {
        map.put("ugh", "thing");
    context = new LiteralCommonContext(map);
    finder = new FetcherStringFinder(context);
  }
View Full Code Here

  CommonContext context;
  StringFinder finder;
 
  public void setUp() throws IOException {
    context = new RemoteSpecCommonContext("src/test/files/cc1.spec");
    finder = new FetcherStringFinder(context);
  }
View Full Code Here

    CommonContext context;
    StringFinder finder;
   
    public void setUp() throws IOException {
        context = new RemoteSpecCommonContext("src/test/files/ccaa.spec");
        finder = new FetcherStringFinder(context);
    }
View Full Code Here

    }
   
      Object template = findTemplate(context);
    if (template != null) {
      if (content != null) {
        context = new FetcherStringFinder(new WrappedFetcher(content, underlying));
      }
      Templater templater = (Templater)context.getObject(Templater.TEMPLATER);
      autoTemplate(context, templater, collector, MojasefConstants.PROLOGUE_TEMPLATE);
      templater.expandTemplate(context, template, collector);
            autoTemplate(context, templater, collector, MojasefConstants.EPILOGUE_TEMPLATE);
View Full Code Here

  CommonContext context;
  StringFinder finder;
 
  public void setUp() throws IOException {
    context = new RemoteSpecCommonContext("src/test/files/http2.spec");
    finder = new FetcherStringFinder(context);
  }
View Full Code Here

    CommonContext context;
    StringFinder finder;
   
    public void setUp() throws IOException {
        context = new RemoteSpecCommonContext("src/test/files/ccac.spec");
        finder = new FetcherStringFinder(context);
    }
View Full Code Here

                String type = mimetype(leaf);
                req.put(HTTPConstants.RESPONSE_CONTENT_TYPE, type);
                res.write((byte[])file);
            } else {
                Object application = common.getObject(MojasefConstants.HTTP_APPLICATION);
                Mojasef.delegateAndExpand(res, new FetcherStringFinder(new PeelbackFetcher(context)), application, dfl);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            res.finish();
View Full Code Here

TOP

Related Classes of org.stringtree.finder.FetcherStringFinder

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.