Examples of findConnections()


Examples of org.apache.sqoop.repository.Repository.findConnections()

    Locale locale = ctx.getAcceptLanguageHeader();
    Repository repository = RepositoryManager.getInstance().getRepository();

    if (sxid.equals("all")) {

      List<MConnection> connections = repository.findConnections();
      bean = new ConnectionBean(connections);

      // Add associated resources into the bean
      for( MConnection connection : connections) {
        long connectorId = connection.getConnectorId();
View Full Code Here

Examples of org.apache.sqoop.repository.Repository.findConnections()

    Locale locale = ctx.getAcceptLanguageHeader();
    Repository repository = RepositoryManager.getRepository();

    if (sxid.equals("all")) {

      List<MConnection> connections = repository.findConnections();
      bean = new ConnectionBean(connections);

      // Add associated resources into the bean
      for( MConnection connection : connections) {
        long connectorId = connection.getConnectorId();
View Full Code Here

Examples of org.apache.sqoop.repository.Repository.findConnections()

    Locale locale = ctx.getAcceptLanguageHeader();
    Repository repository = RepositoryManager.getInstance().getRepository();

    if (sxid.equals("all")) {

      List<MConnection> connections = repository.findConnections();
      bean = new ConnectionBean(connections);

      // Add associated resources into the bean
      for( MConnection connection : connections) {
        long connectorId = connection.getConnectorId();
View Full Code Here

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

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

    }

    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

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 = getSpringApplicationContextFromThymeleafContext(context);
    ConnectionRepository connectionRepository = applicationContext.getBean(ConnectionRepository.class);
View Full Code Here

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

  @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

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

    }

    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

Examples of org.springframework.social.connect.web.test.StubConnectionRepository.findConnections()

    StubConnectionRepository connectionRepository = new StubConnectionRepository();
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("provider1", "provider1User1", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("provider1", "provider1User2", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("oauth2Provider", "provider2User1", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("oauth2Provider", "provider2User2", null, null, null, null, null, null, null)));
    assertEquals(2, connectionRepository.findConnections("provider1").size());   
    assertEquals(2, connectionRepository.findConnections("oauth2Provider").size());       
    ConnectController connectController = new ConnectController(connectionFactoryLocator, connectionRepository);
    List<DisconnectInterceptor<?>> interceptors = getDisconnectInterceptor();
    connectController.setDisconnectInterceptors(interceptors);
    MockMvc mockMvc = standaloneSetup(connectController).build();
View Full Code Here

Examples of org.springframework.social.connect.web.test.StubConnectionRepository.findConnections()

    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("provider1", "provider1User1", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("provider1", "provider1User2", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("oauth2Provider", "provider2User1", null, null, null, null, null, null, null)));
    connectionRepository.addConnection(connectionFactory.createConnection(new ConnectionData("oauth2Provider", "provider2User2", null, null, null, null, null, null, null)));
    assertEquals(2, connectionRepository.findConnections("provider1").size());   
    assertEquals(2, connectionRepository.findConnections("oauth2Provider").size());       
    ConnectController connectController = new ConnectController(connectionFactoryLocator, connectionRepository);
    List<DisconnectInterceptor<?>> interceptors = getDisconnectInterceptor();
    connectController.setDisconnectInterceptors(interceptors);
    MockMvc mockMvc = standaloneSetup(connectController).build();
    mockMvc.perform(delete("/connect/oauth2Provider"))
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.