Class EphemeralAgentsServiceImpl
java.lang.Object
com.atlassian.bamboo.agent.ephemeral.EphemeralAgentsServiceImpl
- All Implemented Interfaces:
EphemeralAgentsService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.agent.ephemeral.EphemeralAgentsService
EphemeralAgentsService.DuplicateTemplateNameException
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOrUpdateCapability
(@NotNull EphemeralAgentTemplate template, @NotNull Capability capability) copyEphemeralAgentTemplate
(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Copies specified Ephemeral Agent Template and saves it within the persistence layer.void
deleteEphemeralAgentTemplate
(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Deletes specified Ephemeral Agent Template from the persistence layer.@NotNull EphemeralAgentsConfiguration
@NotNull Optional<EphemeralAgentTemplate>
getEphemeralAgentTemplate
(long id) Gets the Ephemeral Agent Template for the requested ID if the one exist.@NotNull List<EphemeralAgentTemplate>
Gets all available Ephemeral Agent Templates.@NotNull List<EphemeralAgentTemplate>
getEphemeralAgentTemplates
(@Nullable String filter, int start, int limit) Gets list of Ephemeral Agent Templates filtered.boolean
void
removeCapability
(@NotNull EphemeralAgentTemplate template, @NotNull String capabilityKey) void
saveEphemeralAgentsBaseConfiguration
(@NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration) Persist ephemeral agents configuration.void
saveEphemeralAgentTemplate
(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Saves specified Ephemeral Agent Template within the persistence layer.testConnection
(EphemeralAgentsConfiguration configuration) Validate ephemeral agents configuration and perform attempt to connect provider with provided settings.
-
Constructor Details
-
EphemeralAgentsServiceImpl
public EphemeralAgentsServiceImpl()
-
-
Method Details
-
getEphemeralAgentsBaseConfiguration
- Specified by:
getEphemeralAgentsBaseConfiguration
in interfaceEphemeralAgentsService
- Returns:
- ephemeral agents configuration
-
saveEphemeralAgentsBaseConfiguration
public void saveEphemeralAgentsBaseConfiguration(@NotNull @NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration) throws WebValidationException Description copied from interface:EphemeralAgentsService
Persist ephemeral agents configuration.- Specified by:
saveEphemeralAgentsBaseConfiguration
in interfaceEphemeralAgentsService
- Throws:
WebValidationException
- when settings are not valid
-
isEphemeralAgentsEnabled
public boolean isEphemeralAgentsEnabled()- Specified by:
isEphemeralAgentsEnabled
in interfaceEphemeralAgentsService
- Returns:
- true if ephemeral agents functionality is enabled
-
testConnection
Description copied from interface:EphemeralAgentsService
Validate ephemeral agents configuration and perform attempt to connect provider with provided settings.- Specified by:
testConnection
in interfaceEphemeralAgentsService
- Returns:
- result of connection attempt
-
getEphemeralAgentTemplates
Description copied from interface:EphemeralAgentsService
Gets all available Ephemeral Agent Templates.- Specified by:
getEphemeralAgentTemplates
in interfaceEphemeralAgentsService
- Returns:
- list of the configurations
-
getEphemeralAgentTemplates
@NotNull public @NotNull List<EphemeralAgentTemplate> getEphemeralAgentTemplates(@Nullable @Nullable String filter, int start, int limit) Description copied from interface:EphemeralAgentsService
Gets list of Ephemeral Agent Templates filtered. It supports pagination.- Specified by:
getEphemeralAgentTemplates
in interfaceEphemeralAgentsService
- Returns:
- list of templates
-
getEphemeralAgentTemplate
Description copied from interface:EphemeralAgentsService
Gets the Ephemeral Agent Template for the requested ID if the one exist.- Specified by:
getEphemeralAgentTemplate
in interfaceEphemeralAgentsService
- Parameters:
id
- entity identifier- Returns:
- value if the one exists, empty otherwise
-
saveEphemeralAgentTemplate
public void saveEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) throws TemplateValidationException Description copied from interface:EphemeralAgentsService
Saves specified Ephemeral Agent Template within the persistence layer.- Specified by:
saveEphemeralAgentTemplate
in interfaceEphemeralAgentsService
- Parameters:
ephemeralAgentTemplate
- entity to save- Throws:
TemplateValidationException
-
deleteEphemeralAgentTemplate
public void deleteEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Description copied from interface:EphemeralAgentsService
Deletes specified Ephemeral Agent Template from the persistence layer.- Specified by:
deleteEphemeralAgentTemplate
in interfaceEphemeralAgentsService
- Parameters:
ephemeralAgentTemplate
- entity to delete
-
copyEphemeralAgentTemplate
public EphemeralAgentTemplate copyEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Description copied from interface:EphemeralAgentsService
Copies specified Ephemeral Agent Template and saves it within the persistence layer.- Specified by:
copyEphemeralAgentTemplate
in interfaceEphemeralAgentsService
- Parameters:
ephemeralAgentTemplate
- entity to copy- Returns:
- copy of the entity
-
addOrUpdateCapability
public void addOrUpdateCapability(@NotNull @NotNull EphemeralAgentTemplate template, @NotNull @NotNull Capability capability) - Specified by:
addOrUpdateCapability
in interfaceEphemeralAgentsService
-
removeCapability
public void removeCapability(@NotNull @NotNull EphemeralAgentTemplate template, @NotNull @NotNull String capabilityKey) - Specified by:
removeCapability
in interfaceEphemeralAgentsService
-