Package org.apache.shindig.gadgets.config

Examples of org.apache.shindig.gadgets.config.ConfigContributor.contribute()


          "feature1", "feature2");
    if (extraContrib) {
      libsBuilder.add("feature3");
      ConfigContributor cc = control.createMock(ConfigContributor.class);
      Capture<Map<String, Object>> captureConfig = new Capture<Map<String, Object>>();
      cc.contribute(capture(captureConfig), eq(CONTAINER), eq(HOST));
      expectLastCall().andAnswer(new IAnswer<Void>() {
        @SuppressWarnings("unchecked")
        public Void answer() throws Throwable {
          Map<String, Object> config = (Map<String, Object>)getCurrentArguments()[0];
          String f3Value = (String)config.get("feature3");
View Full Code Here


    JsResponseBuilder builder = prepareRequestReturnBuilder(RenderingContext.CONFIGURED_GADGET);

    ConfigContributor cc = control.createMock(ConfigContributor.class);
    Capture<Map<String, Object>> captureConfig = new Capture<Map<String, Object>>();
    cc.contribute(capture(captureConfig), eq(CONTAINER), eq(HOST));
    expectLastCall().andAnswer(new IAnswer<Void>() {
      @SuppressWarnings("unchecked")
      public Void answer() throws Throwable {
        Map<String, Object> config = (Map<String, Object>)getCurrentArguments()[0];
        String f3Value = (String)config.get("reqfeature1");
View Full Code Here

          "feature1", "feature2");
    if (extraContrib) {
      libsBuilder.add("feature3");
      ConfigContributor cc = control.createMock(ConfigContributor.class);
      Capture<Map<String, Object>> captureConfig = new Capture<Map<String, Object>>();
      cc.contribute(capture(captureConfig), eq(CONTAINER), eq(HOST));
      expectLastCall().andAnswer(new IAnswer<Void>() {
        @SuppressWarnings("unchecked")
        public Void answer() throws Throwable {
          Map<String, Object> config = (Map<String, Object>)getCurrentArguments()[0];
          String f3Value = (String)config.get("feature3");
View Full Code Here

    JsResponseBuilder builder = prepareRequestReturnBuilder(RenderingContext.CONFIGURED_GADGET);

    ConfigContributor cc = control.createMock(ConfigContributor.class);
    Capture<Map<String, Object>> captureConfig = new Capture<Map<String, Object>>();
    cc.contribute(capture(captureConfig), eq(CONTAINER), eq(HOST));
    expectLastCall().andAnswer(new IAnswer<Void>() {
      @SuppressWarnings("unchecked")
      public Void answer() throws Throwable {
        Map<String, Object> config = (Map<String, Object>)getCurrentArguments()[0];
        String f3Value = (String)config.get("reqfeature1");
View Full Code Here

          if (conf != null) {
            config.put(name, conf);
          }
          ConfigContributor contributor = configContributors.get(name);
          if (contributor != null) {
            contributor.contribute(config, container, req.getHeader("Host"));
          }
        }
        jsData.append("gadgets.config.init(").append(JsonSerializer.serialize(config)).append(");\n");
      }
    }
View Full Code Here

        }

        // See if this feature has configuration data
        ConfigContributor contributor = configContributors.get(name);
        if (contributor != null) {
          contributor.contribute(config, gadget);
        }
      }
    }

    return "gadgets.config.init(" + JsonSerializer.serialize(config) + ");\n";
View Full Code Here

        }
       
        // See if this feature has configuration data
        ConfigContributor contributor = configContributors.get(name);
        if (contributor != null) {
          contributor.contribute(config, gadget);
        }
      }
    }

    return "gadgets.config.init(" + JsonSerializer.serialize(config) + ");\n";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.