Interface ProjectConnectionsManager


  • public interface ProjectConnectionsManager
    Successor of the OAuthConnectionsManager
    Since:
    2023.05
    • Method Detail

      • findConnectionById

        @Nullable
        ConnectionDescriptor findConnectionById​(@NotNull
                                                SProject project,
                                                @NotNull
                                                String connectionId)
        Searches for connection by id starting with specified project. Search is performed in specified projects and all its parents until connection is found.
        Parameters:
        project - project to start with
        connectionId - id of the connection
        Returns:
        the first found connection or null
      • getAvailableConnectionsOfType

        @NotNull
        List<ConnectionDescriptor> getAvailableConnectionsOfType​(@NotNull
                                                                 SProject project,
                                                                 @NotNull
                                                                 String providerType)
        Returns all connections of specified type available for current project. These include own project connections and all connections from parent projects.
        Parameters:
        project - current project
        providerType - type of the ConnectionProvider
        Returns:
        all found connections in the project hierarchy order: firstly connections from the specified project, then all connections from parent projects.
      • getAvailableConnections

        @NotNull
        List<ConnectionDescriptor> getAvailableConnections​(@NotNull
                                                           SProject project)
        Returns own project connections and all connections from parent projects.
        Parameters:
        project - current project
        Returns:
        all connections in the project hierarchy order: firstly connections from the specified project, then all connections from parent projects.
      • getOwnAvailableConnections

        @NotNull
        List<ConnectionDescriptor> getOwnAvailableConnections​(@NotNull
                                                              SProject project)
        Returns own project connections
        Parameters:
        project - current project
        Returns:
        all connections of a current project
      • updateConnection

        boolean updateConnection​(@NotNull
                                 SProject project,
                                 @NotNull
                                 String connectionId,
                                 @NotNull
                                 String providerType,
                                 @NotNull
                                 Map<String,​String> parameters)
      • removeConnection

        void removeConnection​(@NotNull
                              SProject project,
                              @NotNull
                              String connectionId)