Package org.apache.shindig.config

Examples of org.apache.shindig.config.BasicContainerConfig$BasicTransaction


    assertEquals(UriStatus.VALID_VERSIONED, manager.validateRenderingUri(uri));
  }

  @Test
  public void containerConfigurationChanges() throws Exception {
    ContainerConfig config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(ImmutableMap
            .<String, Object>builder()
            .put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
            .put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX)
            .put(IFRAME_BASE_PATH_KEY, IFRAME_PATH)
            .put(LOCKED_DOMAIN_REQUIRED_KEY, true)
            .build())
        .commit();
    LockedDomainService ldService = new HashLockedDomainService(config, true, prefixGen);
    TestDefaultIframeUriManager manager = new TestDefaultIframeUriManager(config, ldService);

    Uri testUri = Uri.parse("http://foobar" + LD_SUFFIX + "/?url=http://example.com");

    config.newTransaction().addContainer(ImmutableMap
        .<String, Object>builder()
        .put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
        .put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX_ALT)
        .build()).commit();
    assertEquals(UriStatus.VALID_UNVERSIONED, manager.validateRenderingUri(testUri));
View Full Code Here


  }

  @Test
  public void schemeLessUnlockedDomain() throws Exception {
    Gadget gadget = mockGadget();
    ContainerConfig config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(ImmutableMap.<String, Object>builder()
            .put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
            .put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX)
            .build())
View Full Code Here

    return makeManager(alwaysToken, ldRequired, ldRequired ? true: false);
  }
  private TestDefaultIframeUriManager makeManager(boolean alwaysToken, boolean ldRequired, boolean enabled)
      throws ContainerConfigException {
    String altContainer = CONTAINER + "-alt";
    ContainerConfig config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(ImmutableMap
            .<String, Object>builder()
            .put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
            .put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX)
View Full Code Here

  private FakeTimeSource timeSource;
  private ContainerConfig config;

  @Before
  public void setUp() throws Exception {
    config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(makeContainer("default"))
        .addContainer(makeContainer("container"))
        .addContainer(makeContainer("example"))
View Full Code Here

  private FakeTimeSource timeSource;
  private ContainerConfig config;

  @Before
  public void setUp() throws Exception {
    config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(makeContainer("default"))
        .addContainer(makeContainer("container"))
        .addContainer(makeContainer("example"))
View Full Code Here

          @Override
          public ContentRewriterFeature.Config get(HttpRequest req) {
            return overrideFeatureNoOverrideExpires;
          }
        };
    ContainerConfig config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(DEFAULT_CONTAINER_CONFIG)
        .addContainer(MOCK_CONTAINER_CONFIG)
        .commit();
    proxyUriManager = new DefaultProxyUriManager(config, null);
View Full Code Here

  @Before
  public void setUp() throws Exception {
    parser = new CajaCssParser();
    sanitizer = new CajaCssSanitizer(parser);

    ContainerConfig config = new BasicContainerConfig();
    config.newTransaction().addContainer(DEFAULT_CONTAINER_CONFIG).addContainer(MOCK_CONTAINER_CONFIG).commit();
    ProxyUriManager proxyUriManager = new DefaultProxyUriManager(config, null);

    importRewriter = new SanitizingProxyUriManager(proxyUriManager, "text/css");
    imageRewriter = new SanitizingProxyUriManager(proxyUriManager, "image/*");
    gadgetContext = new GadgetContext() {
View Full Code Here

  private FakeTimeSource timeSource;
  private ContainerConfig config;

  @Before
  public void setUp() throws Exception {
    config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(makeContainer("default"))
        .addContainer(makeContainer("container"))
        .addContainer(makeContainer("example"))
View Full Code Here

  private BasicSecurityTokenCodec codec;
  private ContainerConfig config;

  @Before
  public void setUp() throws Exception {
    config = new BasicContainerConfig();
    codec = new BasicSecurityTokenCodec(config);
  }
View Full Code Here

          @Override
          public ContentRewriterFeature.Config get(HttpRequest req) {
            return overrideFeatureNoOverrideExpires;
          }
        };
    ContainerConfig config = new BasicContainerConfig();
    config
        .newTransaction()
        .addContainer(DEFAULT_CONTAINER_CONFIG)
        .addContainer(MOCK_CONTAINER_CONFIG)
        .commit();
    proxyUriManager = new DefaultProxyUriManager(config, null);
View Full Code Here

TOP

Related Classes of org.apache.shindig.config.BasicContainerConfig$BasicTransaction

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.