You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by hassan bidani <ha...@hotmail.de> on 2010/02/02 11:44:39 UTC
Shindig Implementation
Hi,
After the back-end for the rest of Implemetation Full API = SPI (PersonService.java, AppService.java, ActivityService.java)
and their integration in web.xml (see below web.xml) and (see below GuiceModule.java)
Should I still Implement the Interface OAuthDataStore.java??
and declare it in Web.xml and GuiceModule.java or is it unnecessary??
and in which Shindig files should I add anything??
web.xml :
<context-param>
<param-name>guice-modules</param-name>
<param-value>
org.apache.shindig.common.PropertiesModule:
de.lyth.os.service.GuiceModul
</param-value>
</context-param>
GuiceModul.java :
public class GuiceModul extends SocialApiGuiceModule
{
private static final String ACTIVITY_SPI_BEAN_NAME = "OsActivityServiceID";
private static final String PERSON_SPI_BEAN_NAME = "OsPersonServiceID";
private static final String APP_SPI_BEAN_NAME = "OsApplicationServiceID";
/**
* {@inheritDoc}
* @see com.google.inject.AbstractModule#configure()
*/
@Override
protected void configure()
{
ApplicationContext applicationContext = ApplicationContextFactory.getApplicationContext();
this.bind(ActivityService.class).toInstance((ActivityService) applicationContext.getBean(ACTIVITY_SPI_BEAN_NAME));
this.bind(PersonService.class).toInstance((PersonService) applicationContext.getBean(PERSON_SPI_BEAN_NAME));
this.bind(AppDataService.class).toInstance((AppDataService) applicationContext.getBean(APP_SPI_BEAN_NAME));
super.configure();
}
Thanks in advans
Hassan Bidani
_________________________________________________________________
http://redirect.gimas.net/?n=M1001xFotos2
Dein Santa Claus hat rote Augen? Jetzt X-Mas-Fotos bearbeiten!
Re: Shindig Implementation
Posted by Paul Lindner <li...@inuus.com>.
If you want to support 2-legged oauth you'll want to
implement getSecurityTokenForConsumerRequest(), if you want to support
three-legged oauth you can implement the rest of the interface.
On Tue, Feb 2, 2010 at 2:44 AM, hassan bidani <ha...@hotmail.de>wrote:
>
> Hi,
>
> After the back-end for the rest of Implemetation Full API = SPI
> (PersonService.java, AppService.java, ActivityService.java)
>
> and their integration in web.xml (see below web.xml) and (see below
> GuiceModule.java)
> Should I still Implement the Interface OAuthDataStore.java??
> and declare it in Web.xml and GuiceModule.java or is it unnecessary??
> and in which Shindig files should I add anything??
>
>
> web.xml :
>
> <context-param>
> <param-name>guice-modules</param-name>
> <param-value>
> org.apache.shindig.common.PropertiesModule:
> de.lyth.os.service.GuiceModul
> </param-value>
> </context-param>
>
> GuiceModul.java :
>
> public class GuiceModul extends SocialApiGuiceModule
> {
>
> private static final String ACTIVITY_SPI_BEAN_NAME =
> "OsActivityServiceID";
> private static final String PERSON_SPI_BEAN_NAME = "OsPersonServiceID";
> private static final String APP_SPI_BEAN_NAME = "OsApplicationServiceID";
>
> /**
> * {@inheritDoc}
> * @see com.google.inject.AbstractModule#configure()
> */
> @Override
> protected void configure()
> {
> ApplicationContext applicationContext =
> ApplicationContextFactory.getApplicationContext();
>
> this.bind(ActivityService.class).toInstance((ActivityService)
> applicationContext.getBean(ACTIVITY_SPI_BEAN_NAME));
> this.bind(PersonService.class).toInstance((PersonService)
> applicationContext.getBean(PERSON_SPI_BEAN_NAME));
> this.bind(AppDataService.class).toInstance((AppDataService)
> applicationContext.getBean(APP_SPI_BEAN_NAME));
> super.configure();
> }
>
>
> Thanks in advans
> Hassan Bidani
>
> _________________________________________________________________
> http://redirect.gimas.net/?n=M1001xFotos2
> Dein Santa Claus hat rote Augen? Jetzt X-Mas-Fotos bearbeiten!