Package org.apache.shindig.gadgets.templates

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


      // User-defined libraries - Priority 4
      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
View Full Code Here


    registries.add(registerCustomTags(templates));
   
    // 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   
View Full Code Here

    registries.add(registerCustomTags(templates));
   
    // 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   
View Full Code Here

    Element templateDef = parseTemplate(templateMarkup);
    Element tagInstance = parseTemplate(tagMarkup);
   
    templateDef.getOwnerDocument().adoptNode(tagInstance);
    TagHandler tagHandler = new TemplateBasedTagHandler(tagInstance, TEST_NS, tagName);
    TagRegistry reg = new DefaultTagRegistry(
        ImmutableSet.of(tagHandler, new RepeatTagHandler()));
   
    DocumentFragment result = processor.processTemplate(templateDef, context, resolver, reg);
    String output = serialize(result);
    assertEquals(expectedResult, output);
View Full Code Here

   
    templateDef.getOwnerDocument().adoptNode(tagInstance);
    TagHandler tagHandler =
      new TemplateBasedTagHandler(tagInstance, TEST_NS, tagName);

    TagRegistry reg = new CompositeTagRegistry(ImmutableList.of(
        registry,
        new DefaultTagRegistry(ImmutableSet.of(tagHandler))));
       
    DocumentFragment result = processor.processTemplate(templateDef, context, resolver, reg);
    String output = serialize(result);
View Full Code Here

  public void setUp() {
    fooTag = createTagHandler("foo");
    fooTag2 = createTagHandler("foo");
    barTag = createTagHandler("bar");
   
    TagRegistry first = new DefaultTagRegistry(ImmutableSet.of(fooTag, barTag));
    TagRegistry second = new DefaultTagRegistry(ImmutableSet.of(fooTag2));
   
    registry = new CompositeTagRegistry(ImmutableList.of(first, second));
  }
View Full Code Here

    Element templateDef = parseTemplate(templateMarkup);
    Element tagInstance = parseTemplate(tagMarkup);
   
    templateDef.getOwnerDocument().adoptNode(tagInstance);
    TagHandler tagHandler = new TemplateBasedTagHandler(tagInstance, TEST_NS, tagName);
    TagRegistry reg = new DefaultTagRegistry(
        ImmutableSet.of(tagHandler, new RepeatTagHandler()));
   
    DocumentFragment result = processor.processTemplate(templateDef, context, resolver, reg);
    String output = serialize(result);
    assertEquals(expectedResult, output);
View Full Code Here

   
    templateDef.getOwnerDocument().adoptNode(tagInstance);
    TagHandler tagHandler =
      new TemplateBasedTagHandler(tagInstance, TEST_NS, tagName);

    TagRegistry reg = new CompositeTagRegistry(ImmutableList.of(
        registry,
        new DefaultTagRegistry(ImmutableSet.of(tagHandler))));
       
    DocumentFragment result = processor.processTemplate(templateDef, context, resolver, reg);
    String output = serialize(result);
View Full Code Here

      // User-defined libraries - Priority 4
      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
View Full Code Here

    Element templateDef = parseTemplate(templateMarkup);
    Element tagInstance = parseTemplate(tagMarkup);

    templateDef.getOwnerDocument().adoptNode(tagInstance);
    TagHandler tagHandler = new TemplateBasedTagHandler(tagInstance, TEST_NS, tagName);
    TagRegistry reg = new DefaultTagRegistry(
        ImmutableSet.of(tagHandler, new RepeatTagHandler()));

    DocumentFragment result = processor.processTemplate(templateDef, context, resolver, reg);
    String output = serialize(result);
    assertEquals(expectedResult, output);
View Full Code Here

TOP

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

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.