List of usage examples for org.springframework.context.annotation ScopedProxyMode INTERFACES
ScopedProxyMode INTERFACES
To view the source code for org.springframework.context.annotation ScopedProxyMode INTERFACES.
Click Source Link
From source file:org.easit.core.configurations.MainConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public PluginManager pluginManager() { return PluginManagerFactory.createPluginsManager(environment.getProperty("plugins")); }
From source file:org.easit.core.configurations.SocialConfig.java
/** * Registering the ASIT connections provided to social networks. This * process requires to gather private keys of the social services associated * to the application//from www .jav a 2 s . c o m * * @return */ @Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionFactoryLocator connectionFactoryLocator() { //Handles the back-end side of the authorization flow ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry(); registry.addConnectionFactory(new TwitterConnectionFactory(environment.getProperty("twitter.consumerKey"), environment.getProperty("twitter.consumerSecret"))); registry.addConnectionFactory(new FacebookConnectionFactory(environment.getProperty("facebook.clientId"), environment.getProperty("facebook.clientSecret"))); return registry; }
From source file:de.techdev.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Wunderlist wunderlist(ConnectionRepository repo) { Connection<Wunderlist> wunderlist = repo.findPrimaryConnection(Wunderlist.class); return wunderlist != null ? wunderlist.getApi() : null; }
From source file:com.cloudfoundry.samples.spring.config.SocialConfig.java
/** * Request-scoped data access object providing access to the current user's connections. *///from w w w .ja va2 s . c o m @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { User user = SecurityContext.getCurrentUser(); return usersConnectionRepository().createConnectionRepository(user.getId()); }
From source file:com.notemyweb.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Facebook facebook() { Connection<Facebook> facebook = connectionRepository().findPrimaryConnection(Facebook.class); return facebook != null ? facebook.getApi() : new FacebookTemplate(); }
From source file:com.solxiom.social.config.ExplicitSocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public UsersConnectionRepository usersConnectionRepository() { return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator(), Encryptors.noOpText()); }
From source file:com.devnexus.ting.web.config.SocialConfig.java
/** * Request-scoped data access object providing access to the current user's connections. *//* w w w. j a va 2 s . c o m*/ @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); return usersConnectionRepository().createConnectionRepository(user.getId().toString()); }
From source file:domain.user.social.SocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionFactoryLocator connectionFactoryLocator() { ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry(); registry.addConnectionFactory(new FacebookConnectionFactory(FB_APP_ID, FB_APP_SECRET)); return registry; }
From source file:gr.brid.castamuv.infrastructure.security.SocialConfig.java
/** * Request-scoped data access object providing access to the current user's * connections.//ww w .ja va 2 s.c o m */ @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); return usersConnectionRepository().createConnectionRepository(auth.getName()); }
From source file:org.fuzzydb.samples.mvc.config.SocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public UsersConnectionRepository usersConnectionRepository() { return new JdbcUsersConnectionRepository(dbConfig.dataSource(), connectionFactoryLocator(), Encryptors.noOpText());//w ww . j a va2 s. c o m }