Class AgentAssignmentServiceImpl
java.lang.Object
com.atlassian.bamboo.buildqueue.manager.AgentAssignmentServiceImpl
- All Implemented Interfaces:
AgentAssignmentService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.buildqueue.manager.AgentAssignmentService
AgentAssignmentService.AgentAssignmentExecutable, AgentAssignmentService.AgentAssignmentExecutor -
Constructor Summary
ConstructorsConstructorDescriptionAgentAssignmentServiceImpl(@NotNull AgentAssignmentDao agentAssignmentDao, @NotNull AuditLogService auditLogService, @NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @NotNull ProjectManager projectManager, @NotNull CachedPlanManager cachedPlanManager, @NotNull org.apache.struts2.text.TextProvider textProvider, @NotNull CachedEnvironmentService cachedEnvironmentService, @NotNull CachedDeploymentProjectService cachedDeploymentProjectService, @NotNull com.atlassian.event.api.EventPublisher eventPublisher, @NotNull CapabilitySetManager capabilitySetManager, @NotNull CapabilityRequirementsMatcher capabilityRequirementsMatcher, @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor, @NotNull FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) Remove agent assignment.voiddeleteExecutableAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments) Remove a collection of agent assignments.voiddeleteExecutorAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments) Remove a collection of agent assignments.Retrieve an assignment map used to access executable and executor assignmentsbooleanbooleanisCapabilitiesMatch(ElasticImageConfiguration image, long environmentId) booleanisCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job) booleanisCapabilitiesMatch(EphemeralAgentTemplate template, long environmentId) booleanisCapabilitiesMatch(EphemeralAgentTemplate template, ImmutableJob job) booleanisCapabilitiesMatch(BuildAgent agent, long environmentId) booleanisCapabilitiesMatch(BuildAgent agent, ImmutableJob job) Helper methods to check if executor is capable of running executable@NotNull AgentAssignmentsaveAgentAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) Save an agent assignment
-
Constructor Details
-
AgentAssignmentServiceImpl
public AgentAssignmentServiceImpl(@NotNull @NotNull AgentAssignmentDao agentAssignmentDao, @NotNull @NotNull AuditLogService auditLogService, @NotNull @NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @NotNull @NotNull ProjectManager projectManager, @NotNull @NotNull CachedPlanManager cachedPlanManager, @NotNull @NotNull org.apache.struts2.text.TextProvider textProvider, @NotNull @NotNull CachedEnvironmentService cachedEnvironmentService, @NotNull @NotNull CachedDeploymentProjectService cachedDeploymentProjectService, @NotNull @NotNull com.atlassian.event.api.EventPublisher eventPublisher, @NotNull @NotNull CapabilitySetManager capabilitySetManager, @NotNull @NotNull CapabilityRequirementsMatcher capabilityRequirementsMatcher, @NotNull @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor, @NotNull @NotNull FeatureManager featureManager)
-
-
Method Details
-
saveAgentAssignment
@NotNull public @NotNull AgentAssignment saveAgentAssignment(@NotNull AgentAssignment.ExecutorType executorType, long executorId, @NotNull AgentAssignment.ExecutableType executableType, long entityId) throws WebValidationException, AccessDeniedException Description copied from interface:AgentAssignmentServiceSave an agent assignment- Specified by:
saveAgentAssignmentin interfaceAgentAssignmentService- Returns:
- The saved agent assignment
- Throws:
WebValidationExceptionAccessDeniedException
-
deleteExecutableAssignments
public void deleteExecutableAssignments(@NotNull @NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments) throws AccessDeniedException Description copied from interface:AgentAssignmentServiceRemove a collection of agent assignments.- Specified by:
deleteExecutableAssignmentsin interfaceAgentAssignmentService- Parameters:
agentAssignments- to delete- Throws:
AccessDeniedException
-
deleteAssignment
public void deleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) throws AccessDeniedException Description copied from interface:AgentAssignmentServiceRemove agent assignment.- Specified by:
deleteAssignmentin interfaceAgentAssignmentService- Parameters:
executorType- executor typeexecutorId- executor idexecutableType- executable typeentityId- executable id- Throws:
AccessDeniedException- if don't have permissions to edit entity
-
deleteExecutorAssignments
public void deleteExecutorAssignments(@NotNull @NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments) Description copied from interface:AgentAssignmentServiceRemove a collection of agent assignments.- Specified by:
deleteExecutorAssignmentsin interfaceAgentAssignmentService- Parameters:
agentAssignments- to delete
-
getAgentAssignments
Description copied from interface:AgentAssignmentServiceRetrieve an assignment map used to access executable and executor assignments- Specified by:
getAgentAssignmentsin interfaceAgentAssignmentService- Returns:
-
isCapabilitiesMatch
Description copied from interface:AgentAssignmentServiceHelper methods to check if executor is capable of running executable- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isCapabilitiesMatch
- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isCapabilitiesMatch
- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isCapabilitiesMatch
- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isCapabilitiesMatch
- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isCapabilitiesMatch
- Specified by:
isCapabilitiesMatchin interfaceAgentAssignmentService
-
isAgentAssignmentAllowed
public boolean isAgentAssignmentAllowed()- Specified by:
isAgentAssignmentAllowedin interfaceAgentAssignmentService- Returns:
- true if agent assignment is allowed at Global settings or user is instance Administrator.
-