Interface BuildExecutorsManager
-
- All Known Implementing Classes:
BuildExecutorsManagerImpl
public interface BuildExecutorsManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuildExecutorDescriptor
addExecutor(SProject project, Map<String,String> parameters, String executorType)
Adds a new executor to the specified project.BuildExecutorDescriptor
addExecutor(SProject project, Map<String,String> parameters, BuildExecutorType executorType)
Adds a new executor to the specified project.BuildExecutorDescriptor
findExecutorById(SProject project, String executorId)
Searches for executor by id starting with specified project.BuildExecutorType
findExecutorType(String type)
Finds the BuildExecutorType with the specified type.Collection<BuildExecutorDescriptor>
getAllExecutors()
Retrieves all build executors available in the system.List<BuildExecutorDescriptor>
getAvailableExecutors(SProject project)
Returns own project executor and all connections from parent projects.List<BuildExecutorDescriptor>
getAvailableExecutorsOfType(SProject project, String executorType)
Returns all executors of specified type available for current project.Collection<BuildExecutorType>
getExecutorTypes()
List<BuildExecutorDescriptor>
getOwnAvailableExecutors(SProject project)
Returns own project executorsList<BuildExecutorDescriptor>
getOwnAvailableExecutors(SProject project, boolean includeSubprojects)
Retrieves a list of available build executors for the specified project.boolean
isExecutorEnabled(SProject project, String executorId)
void
removeExecutor(SProject project, String executorId)
Removes a build executor with the specified executorId from the given project.void
setExecutorEnabled(SProject project, String executorId, boolean enabled)
boolean
updateExecutor(SProject project, String executorId, String executorType, Map<String,String> parameters)
Updates the executor with the specified executorId and providerType in the given project with the provided parameters.
-
-
-
Method Detail
-
findExecutorById
@Nullable BuildExecutorDescriptor findExecutorById(@NotNull SProject project, @NotNull String executorId)
Searches for executor by id starting with specified project. Search is performed in specified projects and all its parents until the first executor with the ID is found.- Parameters:
project
- project to start withexecutorId
- id of the executor- Returns:
- the first found executor or null
-
getAvailableExecutorsOfType
@NotNull List<BuildExecutorDescriptor> getAvailableExecutorsOfType(@NotNull SProject project, @NotNull String executorType)
Returns all executors of specified type available for current project. These include own project executors and all executors from parent projects.- Parameters:
project
- current projectexecutorType
- type of theBuildExecutorType
- Returns:
- all found connections in the project hierarchy order: firstly connections from the specified project, then all connections from parent projects.
-
getAvailableExecutors
@NotNull List<BuildExecutorDescriptor> getAvailableExecutors(@NotNull SProject project)
Returns own project executor 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.
-
getOwnAvailableExecutors
@NotNull List<BuildExecutorDescriptor> getOwnAvailableExecutors(@NotNull SProject project)
Returns own project executors- Parameters:
project
- current project- Returns:
- a list of build executor descriptors available for the specified project
-
getOwnAvailableExecutors
@NotNull List<BuildExecutorDescriptor> getOwnAvailableExecutors(@NotNull SProject project, boolean includeSubprojects)
Retrieves a list of available build executors for the specified project.- Parameters:
project
- current projectsincludeSubprojects
- if true, include executors from subprojects- Returns:
- a list of build executor descriptors available for the specified project
- Since:
- 2024.12
-
addExecutor
@NotNull BuildExecutorDescriptor addExecutor(@NotNull SProject project, @NotNull Map<String,String> parameters, @NotNull BuildExecutorType executorType)
Adds a new executor to the specified project.- Parameters:
project
- the project to add the executor toexecutorType
- the type of the executor to addparameters
- the parameters for the executorexecutorType
- the type of the executor to add- Returns:
- the descriptor of the added executor
-
addExecutor
@NotNull BuildExecutorDescriptor addExecutor(@NotNull SProject project, @NotNull Map<String,String> parameters, @NotNull String executorType) throws RuntimeException
Adds a new executor to the specified project.- Parameters:
project
- the project to add the executor toexecutorType
- the type of the executor to addparameters
- the parameters for the executorexecutorType
- the type of the executor to add- Returns:
- the descriptor of the added executor
- Throws:
RuntimeException
-
updateExecutor
boolean updateExecutor(@NotNull SProject project, @NotNull String executorId, @NotNull String executorType, @NotNull Map<String,String> parameters)
Updates the executor with the specified executorId and providerType in the given project with the provided parameters.- Parameters:
project
- the project containing the executorexecutorId
- the id of the executor to updateexecutorType
- the type of the executorparameters
- the new parameters for the executor- Returns:
- true if the executor was successfully updated, false otherwise
-
removeExecutor
void removeExecutor(@NotNull SProject project, @NotNull String executorId)
Removes a build executor with the specified executorId from the given project.- Parameters:
project
- the project from which to remove the executorexecutorId
- the id of the executor to remove
-
getExecutorTypes
@NotNull Collection<BuildExecutorType> getExecutorTypes()
- Returns:
- all available BuildExecutorType
-
findExecutorType
@Nullable BuildExecutorType findExecutorType(@NotNull String type)
Finds the BuildExecutorType with the specified type.- Parameters:
type
- the type of the BuildExecutorType to find- Returns:
- the BuildExecutorType with the specified type, or null if not found
-
getAllExecutors
Collection<BuildExecutorDescriptor> getAllExecutors()
Retrieves all build executors available in the system.- Returns:
- a collection of all available
BuildExecutorDescriptor
instances. - Since:
- 2024.12
-
setExecutorEnabled
void setExecutorEnabled(@NotNull SProject project, @NotNull String executorId, boolean enabled) throws RuntimeException
- Throws:
RuntimeException
-
isExecutorEnabled
boolean isExecutorEnabled(@NotNull SProject project, @NotNull String executorId) throws RuntimeException
- Throws:
RuntimeException
-
-