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, EphemeralAgentsService.TemplateValidationAwareConsumer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOrUpdateCapability(@NotNull EphemeralAgentTemplate template, @NotNull Capability capability) Adds or updates a capability for the given ephemeral agent template.@NotNull EphemeralAgentTemplatecopyEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Copies specified Ephemeral Agent Template and saves it within the persistence layer.voidcreateEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Creates specified Ephemeral Agent Template within the persistence layer.voiddeleteEphemeralAgentTemplate(@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.booleanvoidremoveCapability(@NotNull EphemeralAgentTemplate template, @NotNull String capabilityKey) Removes a capability from the given ephemeral agent template.voidsaveEphemeralAgentsBaseConfiguration(@NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration) Persist ephemeral agents configuration.testConnection(EphemeralAgentsConfiguration configuration) Validate ephemeral agents configuration and perform attempt to connect provider with provided settings.voidupdateEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Updates specified Ephemeral Agent Template within the persistence layer.
-
Constructor Details
-
EphemeralAgentsServiceImpl
public EphemeralAgentsServiceImpl()
-
-
Method Details
-
getEphemeralAgentsBaseConfiguration
- Specified by:
getEphemeralAgentsBaseConfigurationin interfaceEphemeralAgentsService- Returns:
- ephemeral agents configuration
-
saveEphemeralAgentsBaseConfiguration
public void saveEphemeralAgentsBaseConfiguration(@NotNull @NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration) throws WebValidationException Description copied from interface:EphemeralAgentsServicePersist ephemeral agents configuration.- Specified by:
saveEphemeralAgentsBaseConfigurationin interfaceEphemeralAgentsService- Throws:
WebValidationException- when settings are not valid
-
isEphemeralAgentsEnabled
public boolean isEphemeralAgentsEnabled()- Specified by:
isEphemeralAgentsEnabledin interfaceEphemeralAgentsService- Returns:
- true if ephemeral agents functionality is enabled
-
testConnection
Description copied from interface:EphemeralAgentsServiceValidate ephemeral agents configuration and perform attempt to connect provider with provided settings.- Specified by:
testConnectionin interfaceEphemeralAgentsService- Returns:
- result of connection attempt
-
getEphemeralAgentTemplates
Description copied from interface:EphemeralAgentsServiceGets all available Ephemeral Agent Templates.- Specified by:
getEphemeralAgentTemplatesin 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:EphemeralAgentsServiceGets list of Ephemeral Agent Templates filtered. It supports pagination.- Specified by:
getEphemeralAgentTemplatesin interfaceEphemeralAgentsService- Returns:
- list of templates
-
getEphemeralAgentTemplate
Description copied from interface:EphemeralAgentsServiceGets the Ephemeral Agent Template for the requested ID if the one exist.- Specified by:
getEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
id- entity identifier- Returns:
- value if the one exists, empty otherwise
-
createEphemeralAgentTemplate
public void createEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) throws TemplateValidationException Description copied from interface:EphemeralAgentsServiceCreates specified Ephemeral Agent Template within the persistence layer.- Specified by:
createEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
ephemeralAgentTemplate- entity to save- Throws:
TemplateValidationException
-
updateEphemeralAgentTemplate
public void updateEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) throws TemplateValidationException, EphemeralAgentsService.DuplicateTemplateNameException Description copied from interface:EphemeralAgentsServiceUpdates specified Ephemeral Agent Template within the persistence layer.- Specified by:
updateEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
ephemeralAgentTemplate- entity to update- Throws:
TemplateValidationExceptionEphemeralAgentsService.DuplicateTemplateNameException
-
deleteEphemeralAgentTemplate
public void deleteEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Description copied from interface:EphemeralAgentsServiceDeletes specified Ephemeral Agent Template from the persistence layer.- Specified by:
deleteEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
ephemeralAgentTemplate- entity to delete
-
copyEphemeralAgentTemplate
@NotNull public @NotNull EphemeralAgentTemplate copyEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Description copied from interface:EphemeralAgentsServiceCopies specified Ephemeral Agent Template and saves it within the persistence layer.- Specified by:
copyEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
ephemeralAgentTemplate- entity to copy- Returns:
- copy of the entity
-
addOrUpdateCapability
public void addOrUpdateCapability(@NotNull @NotNull EphemeralAgentTemplate template, @NotNull @NotNull Capability capability) Description copied from interface:EphemeralAgentsServiceAdds or updates a capability for the given ephemeral agent template.- Specified by:
addOrUpdateCapabilityin interfaceEphemeralAgentsService- Parameters:
template- the ephemeral agent templatecapability- the capability to add or update
-
removeCapability
public void removeCapability(@NotNull @NotNull EphemeralAgentTemplate template, @NotNull @NotNull String capabilityKey) Description copied from interface:EphemeralAgentsServiceRemoves a capability from the given ephemeral agent template.- Specified by:
removeCapabilityin interfaceEphemeralAgentsService- Parameters:
template- the ephemeral agent templatecapabilityKey- the key of the capability to remove
-