Examples of JsonContainerConfig


Examples of org.apache.shindig.common.JsonContainerConfig

  private BlobCrypterSecurityTokenDecoder decoder;
  private final FakeTimeSource timeSource = new FakeTimeSource();

  @Before
  public void setUp() throws Exception {
    ContainerConfig config = new JsonContainerConfig(null) {
      @Override
      public String get(String container, String name) {
        if (BlobCrypterSecurityTokenDecoder.SECURITY_TOKEN_KEY_FILE.equals(name)) {
          return getContainerKey(container);
        }
View Full Code Here

Examples of org.apache.shindig.common.JsonContainerConfig

    assertTrue(t.isAnonymous());
  }

  @Test
  public void testLoadFailure() throws Exception {
    ContainerConfig config = new JsonContainerConfig(null) {
      @Override
      public String get(String container, String name) {
        if (BlobCrypterSecurityTokenDecoder.SECURITY_TOKEN_KEY_FILE.equals(name)) {
          return getContainerKey(container);
        }
View Full Code Here

Examples of org.apache.shindig.common.JsonContainerConfig

  private JSONArray personFieldsJsonArray;

  @Inject
  public JsonContainerConf() {
    try {
      this.config = new JsonContainerConfig(containerjs);
    } catch (ContainerConfigException e) {
      logger.log(Level.SEVERE, "Not able to load container.js", e);
    }
  }
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, Expressions.forTesting(new Functions()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

  public void testReadConfigNoEndpoints() throws Exception {
    JSONObject config = createConfig();
    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

        "{'gadgets.container': ['default']," +
         "'gadgets.features':{views:" +
           "{aliased: {aliases: ['some-alias', 'alias']}}" +
         "}}}");

    containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
    Gadget gadget = mock(Gadget.class);
    processor = mock(Processor.class);
    Capture<GadgetContext> context = new Capture<GadgetContext>();
    expect(processor.process(EasyMock.capture(context))).andReturn(gadget).anyTimes();
    ldService = new HashLockedDomainService(containerConfig, false, mock(LockedDomainPrefixGenerator.class));
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

        "{'gadgets.container': ['default']," +
         "'gadgets.features':{views:" +
           "{aliased: {aliases: ['some-alias', 'alias']}}" +
         "}}}");

    containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
    ldService = new HashLockedDomainService(containerConfig, false, new HashShaLockedDomainPrefixGenerator());
    handler = new MakeRequestHandler(containerConfig, pipeline, rewriterRegistry, feedProcessorProvider, gadgetAdminStore, processor, ldService);

    DUMMY_TOKEN.setAppUrl("http://some/gadget.xml");
    DUMMY_TOKEN.setContainer(ContainerConfig.DEFAULT_CONTAINER);
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

        "{'gadgets.container': ['default']," +
         "'gadgets.features':{opensocial:" +
           "{supportedFields: {person: ['id', {name: 'familyName'}]}}" +
         "}}}");

    containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
    handler = new PersonHandler(personService, containerConfig);
    registry = new DefaultHandlerRegistry(null, converter,
        new HandlerExecutionListener.NoOpHandler());
    registry.addHandlers(ImmutableSet.<Object>of(handler));
  }
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, new Expressions(new Functions(), null, new ShindigTypeConverter()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.config.JsonContainerConfig

  public void testReadConfigNoEndpoints() throws Exception {
    JSONObject config = createConfig();
    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            new Expressions(new Functions(), null, new ShindigTypeConverter()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
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.