Package org.apache.shindig.gadgets.templates

Examples of org.apache.shindig.gadgets.templates.TemplateContext


      loadTemplateLibraries(gadget.getContext(), feature, registries, libraries);
    }

    TagRegistry registry = new CompositeTagRegistry(registries);

    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side
    // feature is needed.
    String clientOverride = feature.getParam(CLIENT_SUPPORT_PARAM);
View Full Code Here


    // User-defined libraries - Priority 4
    loadTemplateLibraries(gadget.getContext(), f, registries, libraries);
   
    TagRegistry registry = new CompositeTagRegistry(registries);
   
    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());   
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side   
    // feature is needed.                                                 
    String clientOverride = f.getParam(CLIENT_SUPPORT_PARAM);           
View Full Code Here

    // User-defined libraries - Priority 4
    loadTemplateLibraries(gadget.getContext(), f, registries, libraries);
   
    TagRegistry registry = new CompositeTagRegistry(registries);
   
    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());   
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side   
    // feature is needed.                                                 
    String clientOverride = f.getParam(CLIENT_SUPPORT_PARAM);           
View Full Code Here

  public void setUp() throws Exception {
    Injector injector = Guice.createInjector(new ParseModule(), new TemplateModule(),
        new PropertiesModule());
    parser = injector.getInstance(GadgetHtmlParser.class);
    processor = injector.getInstance(TemplateProcessor.class);
    context = new TemplateContext(new Gadget(), null);
  }
View Full Code Here

    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);
   
    addVariable("foo", new JSONObject("{ title: 'bar' }"));
  }
View Full Code Here

  protected Document result;

  @Before
  public void setUp() throws Exception {
    processor = new MyTemplateProcessor();
    processor.context = new TemplateContext(gadget, Collections.<String, JSONObject>emptyMap());
    Injector injector = Guice.createInjector(new ParseModule(), new PropertiesModule());
    documentProvider = injector.getInstance(DOMImplementation.class);
    parser = injector.getInstance(NekoSimplifiedHtmlParser.class);
    featureRegistry = mock(FeatureRegistry.class, true);
    handler = new FlashTagHandler(new BeanJsonConverter(injector), featureRegistry,
View Full Code Here

    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);
   
    addVariable("foo", new JSONObject("{ title: 'bar' }"));
  }
View Full Code Here

  protected Document result;

  @Before
  public void setUp() throws Exception {
    processor = new MyTemplateProcessor();
    processor.context = new TemplateContext(gadget, Collections.<String, JSONObject>emptyMap());
    Injector injector = Guice.createInjector(new ParseModule(), new PropertiesModule());
    documentProvider = injector.getInstance(DOMImplementation.class);
    parser = injector.getInstance(NekoSimplifiedHtmlParser.class);
    featureRegistry = mock(FeatureRegistry.class, true);
    handler = new FlashTagHandler(new BeanJsonConverter(injector), featureRegistry,
View Full Code Here

  @Before
  public void setUp() throws Exception {
    Injector injector = Guice.createInjector(new DefaultGuiceModule(), new OAuthModule(), new PropertiesModule());
    parser = injector.getInstance(GadgetHtmlParser.class);
    processor = injector.getInstance(TemplateProcessor.class);
    context = new TemplateContext(new Gadget(), null);
  }
View Full Code Here

      loadTemplateLibraries(gadget.getContext(), feature, registries, libraries);
    }

    TagRegistry registry = new CompositeTagRegistry(registries);

    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side
    // feature is needed.
    String clientOverride = feature.getParam(CLIENT_SUPPORT_PARAM);
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.templates.TemplateContext

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.