gpt4 book ai didi

org.apache.shindig.social.core.util.xstream.XStream081Configuration类的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 03:43:05 30 4
gpt4 key购买 nike

本文整理了Java中org.apache.shindig.social.core.util.xstream.XStream081Configuration类的一些代码示例,展示了XStream081Configuration类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XStream081Configuration类的具体详情如下:
包路径:org.apache.shindig.social.core.util.xstream.XStream081Configuration
类名称:XStream081Configuration

XStream081Configuration介绍

[英]Opensocial 0.81 compliant Xstream binding
[中]符合Opensocial 0.81的Xstream绑定

代码示例

代码示例来源:origin: org.apache.shindig/shindig-samples

/**
 * Gets the data service servlet.
 * 
 * @param injector the injector
 * 
 * @return the data service servlet
 */
public static DataServiceServlet getDataServiceServlet(Injector injector) {
 // Set data service servlet again to use JPA guice dependencies
 DataServiceServlet servlet = new DataServiceServlet();
 HandlerRegistry registry = injector.getInstance(HandlerRegistry.class);
 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();
 EasyMock.replay(containerConfig);
 servlet.setContainerConfig(containerConfig);
 return servlet;
}

代码示例来源:origin: com.lmco.shindig/shindig-social-api

listElementMappingList.get(c),
itemFieldMappings.get(c),
getOmitMap(c),
elementClassMap.get(c));

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

@Before
public void abstractLargeRestfulBefore() throws Exception {
 injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 servlet = new DataServiceServlet();
 HandlerRegistry dispatcher = injector.getInstance(HandlerRegistry.class);
 dispatcher.addHandlers(injector.getInstance(Key.get(new TypeLiteral<Set<Object>>(){},
   Names.named("org.apache.shindig.handlers"))));
 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.setJSONPAllowed(true);
 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"));
 XMLUnit.setXpathNamespaceContext(ns);
 xp = XMLUnit.newXpathEngine();
}

代码示例来源:origin: org.apache.shindig/shindig-social-api

listElementMappingList.get(c),
itemFieldMappings.get(c),
getOmitMap(c),
elementClassMap.get(c));

代码示例来源:origin: com.lmco.shindig/shindig-social-api

@Before
public void abstractLargeRestfulBefore() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 servlet = new DataServiceServlet();
 HandlerRegistry dispatcher = injector.getInstance(HandlerRegistry.class);
 dispatcher.addHandlers(injector.getInstance(Key.get(new TypeLiteral<Set<Object>>(){},
   Names.named("org.apache.shindig.handlers"))));
 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"));
 XMLUnit.setXpathNamespaceContext(ns);
 xp = XMLUnit.newXpathEngine();
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

listElementMappingList.get(c),
itemFieldMappings.get(c),
getOmitMap(c),
elementClassMap.get(c));

代码示例来源:origin: org.apache.shindig/shindig-social-api

@Before
public void abstractLargeRestfulBefore() throws Exception {
 injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 servlet = new DataServiceServlet();
 HandlerRegistry dispatcher = injector.getInstance(HandlerRegistry.class);
 dispatcher.addHandlers(injector.getInstance(Key.get(new TypeLiteral<Set<Object>>(){},
   Names.named("org.apache.shindig.handlers"))));
 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.setJSONPAllowed(true);
 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"));
 XMLUnit.setXpathNamespaceContext(ns);
 xp = XMLUnit.newXpathEngine();
}

代码示例来源:origin: com.lmco.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 activity.setUrl("http://foo.com/");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
   "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));
 beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 activity.setUrl("http://foo.com/");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
   "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));
 beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
}

代码示例来源:origin: org.apache.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 activity.setUrl("http://foo.com/");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
   "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));
 beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
}

代码示例来源:origin: org.apache.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 MediaItemImpl mediaItem = new MediaItemImpl();
 mediaItem.setMimeType("image/jpg");
 mediaItem.setType(MediaItem.Type.IMAGE);
 mediaItem.setUrl("http://foo.bar");
 mediaItem.setLocation(new AddressImpl("Foo bar address"));
 mediaItem.setNumViews("10000");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(mediaItem));
 activity.setUrl("http://foo.com");
 beanXmlConverter = new BeanXStreamAtomConverter(
   new XStream081Configuration(injector));
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 MediaItemImpl mediaItem = new MediaItemImpl();
 mediaItem.setMimeType("image/jpg");
 mediaItem.setType(MediaItem.Type.IMAGE);
 mediaItem.setUrl("http://foo.bar");
 mediaItem.setLocation(new AddressImpl("Foo bar address"));
 mediaItem.setNumViews("10000");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(mediaItem));
 activity.setUrl("http://foo.com");
 beanXmlConverter = new BeanXStreamAtomConverter(
   new XStream081Configuration(injector));
}

代码示例来源:origin: com.lmco.shindig/shindig-social-api

@Before
public void setUp() throws Exception {
 Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
 johnDoe = new PersonImpl("johnDoeId", "Johnny", new NameImpl("John Doe"));
 johnDoe.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl(
   "home", "+33H000000000"), new ListFieldImpl("mobile", "+33M000000000"),
   new ListFieldImpl("work", "+33W000000000")));
 johnDoe.setAddresses(Lists.<Address> newArrayList(new AddressImpl(
   "My home address")));
 johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
   "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));
 activity = new ActivityImpl("activityId", johnDoe.getId());
 MediaItemImpl mediaItem = new MediaItemImpl();
 mediaItem.setMimeType("image/jpg");
 mediaItem.setType(MediaItem.Type.IMAGE);
 mediaItem.setUrl("http://foo.bar");
 mediaItem.setLocation(new AddressImpl("Foo bar address"));
 mediaItem.setNumViews("10000");
 activity.setMediaItems(Lists.<MediaItem> newArrayList(mediaItem));
 activity.setUrl("http://foo.com");
 beanXmlConverter = new BeanXStreamAtomConverter(
   new XStream081Configuration(injector));
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com