public class AgentAssignmentServiceImpl extends Object implements AgentAssignmentService
AgentAssignmentService.AgentAssignmentExecutable, AgentAssignmentService.AgentAssignmentExecutor| Constructor and Description |
|---|
AgentAssignmentServiceImpl(AgentAssignmentDao agentAssignmentDao,
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) |
| 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 |
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
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 public AgentAssignment saveAgentAssignment(@NotNull AgentAssignment.ExecutorType executorType, long executorId, @NotNull AgentAssignment.ExecutableType executableType, long entityId) throws WebValidationException, AccessDeniedException
AgentAssignmentServicesaveAgentAssignment in interface AgentAssignmentServiceWebValidationExceptionAccessDeniedExceptionpublic void deleteExecutableAssignments(@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
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 AgentAssignmentServiceCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.