Package org.apache.shindig.expressions

Examples of org.apache.shindig.expressions.RootELResolver


    setupGadget(getGadgetXml(contentWithDataRequest));
    Map<PipelinedData, ? extends Object> pipelines =
        rewriter.parsePipelinedData(gadget, content.getDocument());
    assertEquals(1, pipelines.size());
    PipelinedData pipeline = pipelines.keySet().iterator().next();
    PipelinedData.Batch batch = pipeline.getBatch(Expressions.forTesting(), new RootELResolver());
    Map<String, PipelinedData.BatchItem> preloads = batch.getPreloads();
    assertTrue(preloads.containsKey("me"));
    assertEquals(PipelinedData.BatchType.SOCIAL, preloads.get("me").getType());
       
    JsonAssert.assertObjectEquals(
View Full Code Here


        + " key=\"key\""
        + " fields=\"name,id\""
        + "/></Content>";
    View view = new View("test", Arrays.asList(XmlUtil.parse(xml)), SPEC_URL);
    PipelinedData.Batch batch = view.getPipelinedData().getBatch(
        Expressions.forTesting(), new RootELResolver());
   
    assertEquals(1, batch.getPreloads().size());
    assertTrue(batch.getPreloads().containsKey("key"));
  }
View Full Code Here

  private Expressions expressions;

  @Before
  public void setUp() {
    elValues = Maps.newHashMap();
    elResolver = new RootELResolver(elValues);
    expressions = Expressions.forTesting();
  }
View Full Code Here

    variables = Maps.newHashMap();
    Set<TagHandler> handlers = ImmutableSet.of((TagHandler) new RenderTagHandler());
    registry = new DefaultTagRegistry(handlers);

    processor = new DefaultTemplateProcessor(expressions);
    resolver = new RootELResolver();
    parser = new NekoSimplifiedHtmlParser(new ParseModule.DOMImplementationProvider().get());
    Gadget gadget = new Gadget();
    gadget.setContext(new GadgetContext());
    context = new TemplateContext(gadget, variables);
   
View Full Code Here

  private Expressions expressions;

  @Before
  public void setUp() {
    elValues = Maps.newHashMap();
    elResolver = new RootELResolver(elValues);
    expressions = Expressions.forTesting();
  }
View Full Code Here

        + " key=\"key\""
        + " fields=\"name,id\""
        + "/></Content>";
    View view = new View("test", Arrays.asList(XmlUtil.parse(xml)), SPEC_URL);
    PipelinedData.Batch batch = view.getPipelinedData().getBatch(
        Expressions.forTesting(), new RootELResolver());

    assertEquals(1, batch.getPreloads().size());
    assertTrue(batch.getPreloads().containsKey("key"));
  }
View Full Code Here

        new TestTagHandler(),
        singletonElementHandler);
    registry = new DefaultTagRegistry(handlers);

    processor = new DefaultTemplateProcessor(expressions);
    resolver = new RootELResolver();
    parser = new NekoSimplifiedHtmlParser(new ParseModule.DOMImplementationProvider().get());
    context = new TemplateContext(new Gadget(), variables);
   
    variables.put("foo", new JSONObject("{ title: 'bar' }"));
    variables.put("user", new JSONObject("{ id: '101', name: { first: 'John', last: 'Doe' }}"));
View Full Code Here

  private Expressions expressions;

  @Before
  public void setUp() {
    elValues = Maps.newHashMap();
    elResolver = new RootELResolver(elValues);
    expressions = Expressions.forTesting();
  }
View Full Code Here

  @Before
  public void setUp() {
    expressions = Expressions.forTesting(null);
    variables = Maps.newHashMap();
    context = expressions.newELContext(new RootELResolver(variables));
  }
View Full Code Here

        + " key=\"key\""
        + " fields=\"name,id\""
        + "/></Content>";
    View view = new View("test", Arrays.asList(XmlUtil.parse(xml)), SPEC_URL);
    PipelinedData.Batch batch = view.getPipelinedData().getBatch(
        Expressions.forTesting(), new RootELResolver());

    assertEquals(1, batch.getPreloads().size());
    assertTrue(batch.getPreloads().containsKey("key"));
  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.expressions.RootELResolver

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.