Class AgentCapabilityServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.buildqueue.manager.AgentCapabilityServiceImpl
-
- All Implemented Interfaces:
AgentCapabilityService
public class AgentCapabilityServiceImpl extends Object implements AgentCapabilityService
-
-
Constructor Summary
Constructors Constructor Description AgentCapabilityServiceImpl(AgentManager agentManager, AuditLogService auditLogService, CapabilityManager capabilityManager, CapabilitySetManager capabilitySetManager, com.atlassian.event.api.EventPublisher eventPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorCollection
addCapability(@NotNull PipelineDefinition agent, @NotNull String key, @NotNull String value)
Add new capability for agent.@NotNull ReadOnlyCapabilitySet
getAgentCapabilities(@NotNull PipelineDefinition agent, boolean includeShared)
void
removeCapabilities(@NotNull PipelineDefinition agent)
Remove all capabilities for agent.void
removeCapability(@NotNull PipelineDefinition agent, @NotNull String capabilityKey)
Remove agent's capability.ErrorCollection
updateCapability(@NotNull PipelineDefinition agent, @NotNull String key, @Nullable String value, @NotNull CapabilitySource capabilitySource)
Update value of existing capability.
-
-
-
Constructor Detail
-
AgentCapabilityServiceImpl
public AgentCapabilityServiceImpl(AgentManager agentManager, AuditLogService auditLogService, CapabilityManager capabilityManager, CapabilitySetManager capabilitySetManager, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Detail
-
removeCapability
public void removeCapability(@NotNull @NotNull PipelineDefinition agent, @NotNull @NotNull String capabilityKey)
Description copied from interface:AgentCapabilityService
Remove agent's capability.- Specified by:
removeCapability
in interfaceAgentCapabilityService
-
removeCapabilities
public void removeCapabilities(@NotNull @NotNull PipelineDefinition agent)
Description copied from interface:AgentCapabilityService
Remove all capabilities for agent.- Specified by:
removeCapabilities
in interfaceAgentCapabilityService
-
getAgentCapabilities
@NotNull public @NotNull ReadOnlyCapabilitySet getAgentCapabilities(@NotNull @NotNull PipelineDefinition agent, boolean includeShared)
- Specified by:
getAgentCapabilities
in interfaceAgentCapabilityService
includeShared
- if shared credentials should be returned- Returns:
- agent's capability set. Should be not null.
-
addCapability
public ErrorCollection addCapability(@NotNull @NotNull PipelineDefinition agent, @NotNull @NotNull String key, @NotNull @NotNull String value)
Description copied from interface:AgentCapabilityService
Add new capability for agent.- Specified by:
addCapability
in interfaceAgentCapabilityService
- Returns:
- error collection. It's empty if capability successfully added.
-
updateCapability
public ErrorCollection updateCapability(@NotNull @NotNull PipelineDefinition agent, @NotNull @NotNull String key, @Nullable @Nullable String value, @NotNull @NotNull CapabilitySource capabilitySource)
Description copied from interface:AgentCapabilityService
Update value of existing capability.- Specified by:
updateCapability
in interfaceAgentCapabilityService
- Returns:
- error collection. It's empty if capability successfully updated.
-
-