Package org.apache.shindig.gadgets.spec

Examples of org.apache.shindig.gadgets.spec.ApplicationManifest


    try {
      String content = response.getResponseAsString();
      Element element = XmlUtil.parse(content);
      if (ApplicationManifest.NAMESPACE.equals(element.getNamespaceURI())) {
        return new ApplicationManifest(uri, element);
      }
      return new GadgetSpec(uri, element, content);
    } catch (XmlException e) {
      throw new SpecParserException(e);
    }
View Full Code Here


    specFactory.getGadgetSpec(createContext(MANIFEST_URI, true));
  }

  @Test
  public void manifestFetchedWithDefaults() throws Exception {
    ApplicationManifest manifest
        = new ApplicationManifest(MANIFEST_URI, XmlUtil.parse(MANIFEST_XML));
    specFactory.cache.addElement(MANIFEST_URI, manifest, 1000);

    GadgetSpec cachedSpec = new GadgetSpec(SPEC_URL, LOCAL_SPEC_XML);
    specFactory.cache.addElement(SPEC_URL, cachedSpec, 1000);
View Full Code Here

    assertEquals(LOCAL_CONTENT, spec.getView(GadgetSpec.DEFAULT_VIEW).getContent());
  }

  @Test
  public void manifestFetchedByVersion() throws Exception {
    ApplicationManifest manifest
        = new ApplicationManifest(MANIFEST_URI, XmlUtil.parse(MANIFEST_XML));
    specFactory.cache.addElement(MANIFEST_URI, manifest, 1000);

    GadgetSpec cachedSpec = new GadgetSpec(ALT_SPEC_URL, ALT_LOCAL_SPEC_XML);
    specFactory.cache.addElement(ALT_SPEC_URL, cachedSpec, 1000);
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.spec.ApplicationManifest

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.