Class BuildExecutorsManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.clouds.server.impl.executors.BuildExecutorsManagerImpl
-
- All Implemented Interfaces:
BuildExecutorsManager
public class BuildExecutorsManagerImpl extends Object implements BuildExecutorsManager
-
-
Constructor Summary
Constructors Constructor Description BuildExecutorsManagerImpl(ExtensionHolder extensionHolder, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildExecutorDescriptoraddExecutor(SProject project, Map<String,String> parameters, String executorType)Adds a new executor to the specified project.BuildExecutorDescriptoraddExecutor(SProject project, Map<String,String> parameters, BuildExecutorType executorType)Adds a new executor to the specified project.BuildExecutorDescriptorfindExecutorById(SProject project, String executorId)Searches for executor by id starting with specified project.BuildExecutorTypefindExecutorType(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.booleanisExecutorEnabled(SProject project, String executorId)voidremoveExecutor(SProject project, String executorId)Removes a build executor with the specified executorId from the given project.voidsetExecutorEnabled(SProject project, String executorId, boolean enabled)booleanupdateExecutor(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.
-
-
-
Constructor Detail
-
BuildExecutorsManagerImpl
public BuildExecutorsManagerImpl(@NotNull ExtensionHolder extensionHolder, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
findExecutorById
@Nullable public BuildExecutorDescriptor findExecutorById(@NotNull SProject project, @NotNull String executorId)
Description copied from interface:BuildExecutorsManagerSearches 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.- Specified by:
findExecutorByIdin interfaceBuildExecutorsManager- Parameters:
project- project to start withexecutorId- id of the executor- Returns:
- the first found executor or null
-
getAvailableExecutorsOfType
@NotNull public List<BuildExecutorDescriptor> getAvailableExecutorsOfType(@NotNull SProject project, @NotNull String executorType)
Description copied from interface:BuildExecutorsManagerReturns all executors of specified type available for current project. These include own project executors and all executors from parent projects.- Specified by:
getAvailableExecutorsOfTypein interfaceBuildExecutorsManager- 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 public List<BuildExecutorDescriptor> getAvailableExecutors(@NotNull SProject project)
Description copied from interface:BuildExecutorsManagerReturns own project executor and all connections from parent projects.- Specified by:
getAvailableExecutorsin interfaceBuildExecutorsManager- 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 public List<BuildExecutorDescriptor> getOwnAvailableExecutors(@NotNull SProject project)
Description copied from interface:BuildExecutorsManagerReturns own project executors- Specified by:
getOwnAvailableExecutorsin interfaceBuildExecutorsManager- Parameters:
project- current project- Returns:
- a list of build executor descriptors available for the specified project
-
getAllExecutors
public Collection<BuildExecutorDescriptor> getAllExecutors()
Description copied from interface:BuildExecutorsManagerRetrieves all build executors available in the system.- Specified by:
getAllExecutorsin interfaceBuildExecutorsManager- Returns:
- a collection of all available
BuildExecutorDescriptorinstances.
-
getOwnAvailableExecutors
@NotNull public List<BuildExecutorDescriptor> getOwnAvailableExecutors(@NotNull SProject project, boolean includeSubprojects)
Description copied from interface:BuildExecutorsManagerRetrieves a list of available build executors for the specified project.- Specified by:
getOwnAvailableExecutorsin interfaceBuildExecutorsManager- Parameters:
project- current projectsincludeSubprojects- if true, include executors from subprojects- Returns:
- a list of build executor descriptors available for the specified project
-
addExecutor
@NotNull public BuildExecutorDescriptor addExecutor(@NotNull SProject project, @NotNull Map<String,String> parameters, @NotNull String executorType)
Description copied from interface:BuildExecutorsManagerAdds a new executor to the specified project.- Specified by:
addExecutorin interfaceBuildExecutorsManager- Parameters:
project- the project to add the executor toparameters- the parameters for the executorexecutorType- the type of the executor to add- Returns:
- the descriptor of the added executor
-
addExecutor
@NotNull public BuildExecutorDescriptor addExecutor(@NotNull SProject project, @NotNull Map<String,String> parameters, @NotNull BuildExecutorType executorType)
Description copied from interface:BuildExecutorsManagerAdds a new executor to the specified project.- Specified by:
addExecutorin interfaceBuildExecutorsManager- Parameters:
project- the project to add the executor toparameters- the parameters for the executorexecutorType- the type of the executor to add- Returns:
- the descriptor of the added executor
-
updateExecutor
public boolean updateExecutor(@NotNull SProject project, @NotNull String executorId, @NotNull String executorType, @NotNull Map<String,String> parameters)Description copied from interface:BuildExecutorsManagerUpdates the executor with the specified executorId and providerType in the given project with the provided parameters.- Specified by:
updateExecutorin interfaceBuildExecutorsManager- 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
public void removeExecutor(@NotNull SProject project, @NotNull String executorId)Description copied from interface:BuildExecutorsManagerRemoves a build executor with the specified executorId from the given project.- Specified by:
removeExecutorin interfaceBuildExecutorsManager- Parameters:
project- the project from which to remove the executorexecutorId- the id of the executor to remove
-
getExecutorTypes
@NotNull public Collection<BuildExecutorType> getExecutorTypes()
- Specified by:
getExecutorTypesin interfaceBuildExecutorsManager- Returns:
- all available BuildExecutorType
-
findExecutorType
@Nullable public BuildExecutorType findExecutorType(@NotNull String type)
Description copied from interface:BuildExecutorsManagerFinds the BuildExecutorType with the specified type.- Specified by:
findExecutorTypein interfaceBuildExecutorsManager- Parameters:
type- the type of the BuildExecutorType to find- Returns:
- the BuildExecutorType with the specified type, or null if not found
-
setExecutorEnabled
public void setExecutorEnabled(@NotNull SProject project, @NotNull String executorId, boolean enabled) throws RuntimeException- Specified by:
setExecutorEnabledin interfaceBuildExecutorsManager- Throws:
RuntimeException
-
isExecutorEnabled
public boolean isExecutorEnabled(@NotNull SProject project, @NotNull String executorId) throws RuntimeException- Specified by:
isExecutorEnabledin interfaceBuildExecutorsManager- Throws:
RuntimeException
-
-