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:net.nobien.springsocial.examples.instagram.config.SocialConfig.java
/** * A proxy to a request-scoped object representing the current user's primary Instagram account. * @throws NotConnectedException if the user is not connected to Instagram. *//*from w ww . j a va 2 s. c o m*/ @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Instagram foursquare() { return connectionRepository().getPrimaryConnection(Instagram.class).getApi(); }
From source file:org.drugis.addis.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Google google(ConnectionRepository repository) { Connection<Google> connection = repository.findPrimaryConnection(Google.class); return connection != null ? connection.getApi() : null; }
From source file:net.nobien.springsocial.examples.foursquare.config.SocialConfig.java
/** * A proxy to a request-scoped object representing the current user's primary Foursquare account. * @throws NotConnectedException if the user is not connected to Foursquare. *///from ww w . j a v a2 s. c o m @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Foursquare foursquare() { return connectionRepository().getPrimaryConnection(Foursquare.class).getApi(); }
From source file:com.yj.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Google googleConnection(ConnectionRepository repository) { Connection<Google> connection = repository.findPrimaryConnection(Google.class); return connection != null ? connection.getApi() : null; }
From source file:com.devnexus.ting.web.config.SocialConfig.java
/** * A proxy to a request-scoped object representing the current user's primary Facebook account. * @throws NotConnectedException if the user is not connected to facebook. *///from w ww . jav a2 s . co m @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Google facebook() { return connectionRepository().getPrimaryConnection(Google.class).getApi(); }
From source file:domain.user.social.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { throw new AccessDeniedException("No user signed in"); }//from w ww . ja va 2s . c o m User user = ((SecureUser) authentication.getPrincipal()).getUser(); return usersConnectionRepository().createConnectionRepository(String.valueOf(user.getUid())); }
From source file:org.easit.core.configurations.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Facebook facebook() { Connection<Facebook> connection = connectionRepository().findPrimaryConnection(Facebook.class); return connection != null ? connection.getApi() : new FacebookTemplate(); }
From source file:org.easit.core.configurations.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Twitter twitter() { Connection<Twitter> twitter = connectionRepository().findPrimaryConnection(Twitter.class); return twitter != null ? twitter.getApi() : new TwitterTemplate(); }
From source file:com.kdubb.socialshowcaseboot.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Twitter twitter(ConnectionRepository repository) { Connection<Twitter> connection = repository.findPrimaryConnection(Twitter.class); return connection != null ? connection.getApi() : null; }
From source file:com.kdubb.socialshowcaseboot.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public LinkedIn linkedin(ConnectionRepository repository) { Connection<LinkedIn> connection = repository.findPrimaryConnection(LinkedIn.class); return connection != null ? connection.getApi() : null; }