Examples of BeanJsonConverter


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

  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

    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

  protected SocialRequestItem request;

  @Before
  public void setUp() throws Exception {
    token = new FakeGadgetToken();
    converter = new BeanJsonConverter(Guice.createInjector());
    mediaService = mock(MediaItemService.class);
    JSONObject config = new JSONObject('{' + ContainerConfig.DEFAULT_CONTAINER + ':' +
        "{'gadgets.container': ['default']," +
         "'gadgets.features':{opensocial:" +
           "{supportedFields: {mediaItem: ['id', 'language', 'title']}}" +
View Full Code Here

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

  private DefaultHandlerRegistry registry;
  private BeanJsonConverter converter;

  @Before
  public void setUp() throws Exception {
    converter = new BeanJsonConverter(Guice.createInjector());
    registry = new DefaultHandlerRegistry(null, converter,
        new HandlerExecutionListener.NoOpHandler());
    registry.addHandlers(Sets.<Object>newHashSet(new TestHandler()));
  }
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 SocialRequestItem(
        Maps.<String, String[]>newHashMap(),
        FAKE_TOKEN, converter, converter);
  }
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

  @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
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.