Package org.springframework.social.connect

Examples of org.springframework.social.connect.ConnectionRepository.findConnections()


    final String providerId = element.getAttributeValue(attributeName);
    if (providerId == null || providerId.trim().equals("")) {
      return false;
    }
    ConnectionRepository connectionRepository = getConnectionRepository(arguments.getContext());
    return connectionRepository.findConnections(providerId).size() > 0;
  }

  private ConnectionRepository getConnectionRepository(final IContext context) {
    ApplicationContext applicationContext = null;
    if (thymeleaf4Present) {
View Full Code Here


    }

    ConnectionRepository repo = usersConnectionRepository.createConnectionRepository(userId);

    if (!authService.getConnectionCardinality().isMultiProviderUserId()) {
      List<Connection<?>> connections = repo.findConnections(data.getProviderId());
      if (!connections.isEmpty()) {
        // TODO maybe throw an exception to allow UI feedback?
        return null;
      }
    }
View Full Code Here

    final String providerId = element.getAttributeValue(attributeName);
    if (providerId == null || providerId.trim().equals("")) {
      return false;
    }
    ConnectionRepository connectionRepository = getConnectionRepository(arguments.getContext());
    return connectionRepository.findConnections(providerId).size() > 0;
  }

  private ConnectionRepository getConnectionRepository(final IContext context) {
    ApplicationContext applicationContext = getSpringApplicationContextFromThymeleafContext(context);
    ConnectionRepository connectionRepository = applicationContext.getBean(ConnectionRepository.class);
View Full Code Here

  @Override
  public SpringSocialProfile getUserProfile(String userId)
      throws UsernameNotFoundException {
    ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository(userId);
    List<Connection<SpringSocialSecurity>> connections = connectionRepository.findConnections(SpringSocialSecurity.class);
    if (connections.size() ==1)
    {
      return connections.get(0).getApi().getUserProfile();
    }
    else
View Full Code Here

    }

    ConnectionRepository repo = usersConnectionRepository.createConnectionRepository(userId);

    if (!authService.getConnectionCardinality().isMultiProviderUserId()) {
      List<Connection<?>> connections = repo.findConnections(connectionKey.getProviderId());
      if (!connections.isEmpty()) {
        // TODO maybe throw an exception to allow UI feedback?
        return null;
      }
    }
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.