public class AgentAssignmentServiceImpl extends Object implements AgentAssignmentService
AgentAssignmentService.AgentAssignmentExecutable, AgentAssignmentService.AgentAssignmentExecutor
Constructor and Description |
---|
AgentAssignmentServiceImpl(AgentAssignmentDao agentAssignmentDao,
AuditLogService auditLogService,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
ProjectManager projectManager,
CachedPlanManager cachedPlanManager,
com.atlassian.struts.TextProvider textProvider,
EnvironmentService environmentService,
com.atlassian.event.api.EventPublisher eventPublisher,
CapabilitySetManager capabilitySetManager,
CapabilityRequirementsMatcher capabilityRequirementsMatcher,
AdministrationConfigurationAccessor administrationConfigurationAccessor) |
Modifier and Type | Method and Description |
---|---|
void |
deleteAssignment(AgentAssignment.ExecutorType executorType,
long executorId,
AgentAssignment.ExecutableType executableType,
long entityId)
Remove agent assignment.
|
void |
deleteExecutableAssignments(Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)
Remove a collection of agent assignments.
|
void |
deleteExecutorAssignments(Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)
Remove a collection of agent assignments.
|
AgentAssignmentMap |
getAgentAssignments()
Retrieve an assignment map used to access executable and executor assignments
|
boolean |
isAgentAssignmentAllowed() |
boolean |
isCapabilitiesMatch(BuildAgent agent,
ImmutableJob job)
Helper methods to check if executor is capable of running executable
|
boolean |
isCapabilitiesMatch(BuildAgent agent,
long environmentId) |
boolean |
isCapabilitiesMatch(ElasticImageConfiguration image,
ImmutableJob job) |
boolean |
isCapabilitiesMatch(ElasticImageConfiguration image,
long environmentid) |
AgentAssignment |
saveAgentAssignment(AgentAssignment.ExecutorType executorType,
long executorId,
AgentAssignment.ExecutableType executableType,
long entityId)
Save an agent assignment
|
public AgentAssignmentServiceImpl(@NotNull AgentAssignmentDao agentAssignmentDao, @NotNull AuditLogService auditLogService, @NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @NotNull ProjectManager projectManager, @NotNull CachedPlanManager cachedPlanManager, @NotNull com.atlassian.struts.TextProvider textProvider, @NotNull EnvironmentService environmentService, @NotNull com.atlassian.event.api.EventPublisher eventPublisher, @NotNull CapabilitySetManager capabilitySetManager, @NotNull CapabilityRequirementsMatcher capabilityRequirementsMatcher, @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor)
@NotNull public AgentAssignment saveAgentAssignment(@NotNull AgentAssignment.ExecutorType executorType, long executorId, @NotNull AgentAssignment.ExecutableType executableType, long entityId) throws WebValidationException, AccessDeniedException
AgentAssignmentService
saveAgentAssignment
in interface AgentAssignmentService
WebValidationException
AccessDeniedException
public void deleteExecutableAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments) throws AccessDeniedException
AgentAssignmentService
deleteExecutableAssignments
in interface AgentAssignmentService
agentAssignments
- to deleteAccessDeniedException
public void deleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) throws AccessDeniedException
AgentAssignmentService
deleteAssignment
in interface AgentAssignmentService
executorType
- executor typeexecutorId
- executor idexecutableType
- executable typeentityId
- executable idAccessDeniedException
- if don't have permissions to edit entitypublic void deleteExecutorAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)
AgentAssignmentService
deleteExecutorAssignments
in interface AgentAssignmentService
agentAssignments
- to deletepublic AgentAssignmentMap getAgentAssignments()
AgentAssignmentService
getAgentAssignments
in interface AgentAssignmentService
public boolean isCapabilitiesMatch(BuildAgent agent, ImmutableJob job)
AgentAssignmentService
isCapabilitiesMatch
in interface AgentAssignmentService
public boolean isCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job)
isCapabilitiesMatch
in interface AgentAssignmentService
public boolean isCapabilitiesMatch(BuildAgent agent, long environmentId)
isCapabilitiesMatch
in interface AgentAssignmentService
public boolean isCapabilitiesMatch(ElasticImageConfiguration image, long environmentid)
isCapabilitiesMatch
in interface AgentAssignmentService
public boolean isAgentAssignmentAllowed()
isAgentAssignmentAllowed
in interface AgentAssignmentService
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.