Examples of BeanJsonConverter


Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

    processor.context = new TemplateContext(gadget, Collections.<String, JSONObject>emptyMap());
    Injector injector = Guice.createInjector(new ParseModule(), new PropertiesModule());
    documentProvider = injector.getInstance(DOMImplementation.class);
    parser = injector.getInstance(NekoSimplifiedHtmlParser.class);
    featureRegistry = mock(FeatureRegistry.class, true);
    handler = new FlashTagHandler(new BeanJsonConverter(injector), featureRegistry,
        "http://example.org/ns", "9.0.115");
    result = parser.parseDom("");

    EasyMock.expect(gadget.getContext()).andReturn(gadgetContext).anyTimes();
  }
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

  private FeatureRegistryProvider featureRegistryProvider;

  @Before
  public void setUp() throws Exception {
    injector = Guice.createInjector();
    converter = new BeanJsonConverter(injector);
    authContext = new FakeGadgetToken();
    featureRegistryProvider = new FeatureRegistryProvider() {
      public FeatureRegistry get(String repository) throws GadgetException {
        return mockRegistry;
      }
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

    registry.addHandlers(
        ImmutableSet.<Object>of(ActivityHandler.class, AppDataHandler.class,
            PersonHandler.class, MessageHandler.class));

    servlet.setHandlerRegistry(registry);
    servlet.setBeanConverters(new BeanJsonConverter(injector),
        new BeanXStreamConverter(new XStream081Configuration(injector)),
        new BeanXStreamAtomConverter(new XStream081Configuration(injector)));

    ContainerConfig containerConfig = EasyMock.createMock(ContainerConfig.class);
    EasyMock.expect(containerConfig.<String>getList(null, "gadgets.parentOrigins")).andReturn(Collections.<String>singletonList("*")).anyTimes();
 
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

    multipartFormParser = mockControl.createMock(MultipartFormParser.class);
    EasyMock.expect(multipartFormParser.isMultipartContent(req)).andStubReturn(false);
    servlet.setMultipartFormParser(multipartFormParser);

    BeanJsonConverter converter = new BeanJsonConverter(Guice.createInjector());

    HandlerRegistry registry = new DefaultHandlerRegistry(null, null,
        new HandlerExecutionListener.NoOpHandler());
    registry.addHandlers(Collections.<Object>singleton(handler));
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

  @Before
  public void setUp() throws Exception {
    FAKE_TOKEN.setAppId("12345");
    FAKE_TOKEN.setOwnerId("someowner");
    FAKE_TOKEN.setViewerId("someowner");
    converter = new BeanJsonConverter(Guice.createInjector());
    request = new BaseRequestItem(
        Maps.<String,String[]>newHashMap(),
        FAKE_TOKEN, converter, converter);
  }
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

  @Before
  public void setUp() throws Exception {
    FAKE_TOKEN.setAppId("12345");
    FAKE_TOKEN.setOwnerId("someowner");
    FAKE_TOKEN.setViewerId("someowner");
    converter = new BeanJsonConverter(Guice.createInjector());
    Map<String, String[]> optionalParameters = Maps.newHashMap();
    String[] cvalue1 = {"cvalue1"};
    String[] cvalue2 = {"cvalue2"};
    optionalParameters.put("condition1",cvalue1);
    optionalParameters.put("condition2",cvalue2);
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

  @Before
  public void setUp() throws Exception {
    FAKE_TOKEN.setAppId("12345");
    FAKE_TOKEN.setOwnerId("someowner");
    FAKE_TOKEN.setViewerId("someowner");
    converter = new BeanJsonConverter(Guice.createInjector());
    request = new SocialRequestItem(
        Maps.<String, String[]>newHashMap(),
        FAKE_TOKEN, converter, converter);
  }
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

    servlet.setHandlerRegistry(dispatcher);
    ContainerConfig containerConfig = EasyMock.createMock(ContainerConfig.class);
    EasyMock.expect(containerConfig.<String>getList(null, "gadgets.parentOrigins")).andReturn(Collections.<String>singletonList("*")).anyTimes();
    EasyMock.replay(containerConfig);
    servlet.setContainerConfig(containerConfig);
    servlet.setBeanConverters(new BeanJsonConverter(injector),
        new BeanXStreamConverter(new XStream081Configuration(injector)),
        new BeanXStreamAtomConverter(new XStream081Configuration(injector)));

    res = EasyMock.createMock(HttpServletResponse.class);
    NamespaceContext ns = new SimpleNamespaceContext(ImmutableMap.of("", "http://ns.opensocial.org/2008/opensocial"));
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

  public void setUp() throws Exception {
    token = new FakeGadgetToken();
    token.setAppUrl("http://www.example.com/gadget.xml");

    Injector injector = Guice.createInjector();
    converter = new BeanJsonConverter(injector);

    HttpRequestHandler handler = new HttpRequestHandler(pipeline, rewriterRegistry);
    registry = new DefaultHandlerRegistry(injector, converter,
        new HandlerExecutionListener.NoOpHandler());
    registry.addHandlers(ImmutableSet.<Object>of(handler));
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.BeanJsonConverter

    registry.addHandlers(
        ImmutableSet.<Object>of(ActivityHandler.class, AppDataHandler.class,
            PersonHandler.class, MessageHandler.class));

    servlet.setHandlerRegistry(registry);
    servlet.setBeanConverters(new BeanJsonConverter(injector),
        new BeanXStreamConverter(new XStream081Configuration(injector)),
        new BeanXStreamAtomConverter(new XStream081Configuration(injector)));

    ContainerConfig containerConfig = EasyMock.createMock(ContainerConfig.class);
    EasyMock.expect(containerConfig.<String>getList(null, "gadgets.parentOrigins")).andReturn(Collections.<String>singletonList("*")).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.