public class AgentAssignmentServiceImpl extends Object implements AgentAssignmentService
AgentAssignmentService.AgentAssignmentExecutable, AgentAssignmentService.AgentAssignmentExecutor| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAssignment(AgentAssignment.ExecutorType executorType,
long executorId,
AgentAssignment.ExecutableType executableType,
long entityId)
Remove agent assignment.
|
void |
deleteExecutableAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)
Remove a collection of agent assignments.
|
void |
deleteExecutorAssignments(@NotNull 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) |
@NotNull AgentAssignment |
saveAgentAssignment(AgentAssignment.ExecutorType executorType,
long executorId,
AgentAssignment.ExecutableType executableType,
long entityId)
Save an agent assignment
|
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 com.atlassian.struts.TextProvider textProvider,
@NotNull
@NotNull EnvironmentService environmentService,
@NotNull
@NotNull com.atlassian.event.api.EventPublisher eventPublisher,
@NotNull
@NotNull CapabilitySetManager capabilitySetManager,
@NotNull
@NotNull CapabilityRequirementsMatcher capabilityRequirementsMatcher,
@NotNull
@NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor)
@NotNull public @NotNull AgentAssignment saveAgentAssignment(@NotNull AgentAssignment.ExecutorType executorType, long executorId, @NotNull AgentAssignment.ExecutableType executableType, long entityId) throws WebValidationException, AccessDeniedException
AgentAssignmentServicesaveAgentAssignment in interface AgentAssignmentServiceWebValidationExceptionAccessDeniedExceptionpublic void deleteExecutableAssignments(@NotNull
@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)
throws AccessDeniedException
AgentAssignmentServicedeleteExecutableAssignments in interface AgentAssignmentServiceagentAssignments - to deleteAccessDeniedExceptionpublic void deleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) throws AccessDeniedException
AgentAssignmentServicedeleteAssignment in interface AgentAssignmentServiceexecutorType - executor typeexecutorId - executor idexecutableType - executable typeentityId - executable idAccessDeniedException - if don't have permissions to edit entitypublic void deleteExecutorAssignments(@NotNull
@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)
AgentAssignmentServicedeleteExecutorAssignments in interface AgentAssignmentServiceagentAssignments - to deletepublic AgentAssignmentMap getAgentAssignments()
AgentAssignmentServicegetAgentAssignments in interface AgentAssignmentServicepublic boolean isCapabilitiesMatch(BuildAgent agent, ImmutableJob job)
AgentAssignmentServiceisCapabilitiesMatch in interface AgentAssignmentServicepublic boolean isCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job)
isCapabilitiesMatch in interface AgentAssignmentServicepublic boolean isCapabilitiesMatch(BuildAgent agent, long environmentId)
isCapabilitiesMatch in interface AgentAssignmentServicepublic boolean isCapabilitiesMatch(ElasticImageConfiguration image, long environmentid)
isCapabilitiesMatch in interface AgentAssignmentServicepublic boolean isAgentAssignmentAllowed()
isAgentAssignmentAllowed in interface AgentAssignmentServiceCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.