Package org.stringtree.fetcher

Examples of org.stringtree.fetcher.MapFetcher


public class SessionWrapper extends ApplicationWrapper {
    protected MapFetcher sessions = null;
   
    public SessionWrapper(String classname) {
        super(classname);
        sessions = new MapFetcher();
    }
View Full Code Here


        String[] dirs = path.split("/");
        if (this.dirs.length > dirs.length) return false;
       
        String mount = context.get(MojasefConstants.MOUNTCONTEXT) + context.get(MojasefConstants.MOUNTPOINT);
        StringBuffer realmount = new StringBuffer();
        Repository tokens = new MapFetcher();
        for (int i = 0; i < this.dirs.length; ++i) {
            if (isToken(this.dirs[i])) {
                tokens.put(tokenSymbol(this.dirs[i]), dirs[i]);
            } else if (!this.dirs[i].equals(dirs[i])){
                return false;
            }
            realmount.append(dirs[i]);
            realmount.append("/");
View Full Code Here

    Repository templates;

    public void setUp() {
      super.setUp();
        dfl = new DflOut();
        templates = new MapFetcher();
        context.put(Templater.TEMPLATE, templates);
        context.put(Templater.TEMPLATER, new DirectFetcherTemplater(templates));
    }
View Full Code Here

  public void assertCollected(String text) {
      assertEquals(text, collector.toString());
  }

    public void setUp() {
        context = new MapFetcher();
        keeper = new FetcherStringKeeper(context);
        collector = new ByteArrayStringCollector();
        context.put(MojasefConstants.OUTPUT_COLLECTOR, collector);
    }
View Full Code Here

   
    public void setUp() {
        map = new HashMap<String, Object>();
        map.put(MojasefConstants.MOUNTCONTEXT, "/");
        map.put(MojasefConstants.MOUNTPOINT, "");
        repository = new MapFetcher(map);
    }
View Full Code Here

  public static String methodName(StringFinder context) {
        return context.get(MojasefConstants.REQUEST_PATHOBJECT);
  }

  public static StringFinder createSubcontext(StringFinder context, String path, String mountpoint) {
      MapFetcher repository = new MapFetcher();
      Fetcher subcontext = new FallbackFetcher(repository, context.getUnderlyingFetcher());
      repository.put(MojasefConstants.MOUNTCONTEXT, getMountContext(context));
      repository.put(MojasefConstants.MOUNTPOINT, mountpoint);
        repository.put(MojasefConstants.REQUEST_LOCALPATH, path);
      return new FetcherStringKeeper(subcontext);
  }
View Full Code Here

  String HEADER = "http.header.";
  String COOKIE = "http.header.";
 
  public void setUp()
  {
    store = new FetcherStringKeeper(new MapFetcher());
  }
View Full Code Here

public class RequestContext extends FallbackRepository {
   
  private Collection<Alias> aliases;

  public RequestContext(Fetcher context, Collection<Alias> aliases) {
    super(new MapFetcher(), context);
    this.aliases = aliases;
  }
View Full Code Here

    protected Fetcher templates;
    protected Fetcher pub;
  protected boolean lock;

  public CommonContext(Fetcher templates, Fetcher pub, boolean lock) {
        super(new MapFetcher());
    this.templates = templates;
        this.pub = pub;
    this.lock = lock;
  }
View Full Code Here

        Object object = peelback.getObject("http.application.context");
        if (null != object) {
            if (object instanceof Fetcher) {
                setOther(new FallbackRepository((Fetcher)object, original));
            } else if (object instanceof Map) {
                setOther(new FallbackRepository(new MapFetcher((Map<String, Object>)object), original));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.stringtree.fetcher.MapFetcher

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.