Class EphemeralAgentsServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.agent.ephemeral.EphemeralAgentsServiceImpl
-
- All Implemented Interfaces:
EphemeralAgentsService
public class EphemeralAgentsServiceImpl extends Object implements EphemeralAgentsService
-
-
Constructor Summary
Constructors Constructor Description EphemeralAgentsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrUpdateCapability(@NotNull EphemeralAgentTemplate template, @NotNull Capability capability)EphemeralAgentTemplatecopyEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate)Copies specified Ephemeral Agent Template and saves it within the persistence layer.voiddeleteEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate)Deletes specified Ephemeral Agent Template from the persistence layer.EphemeralAgentsConfigurationgetEphemeralAgentsBaseConfiguration()@NotNull Optional<EphemeralAgentTemplate>getEphemeralAgentTemplate(long id)Gets the Ephemeral Agent Template for the requested ID if the one exist.@NotNull List<EphemeralAgentTemplate>getEphemeralAgentTemplates()Gets all available Ephemeral Agent Templates.@NotNull List<EphemeralAgentTemplate>getEphemeralAgentTemplates(@Nullable String filter, int start, int limit)Gets list of Ephemeral Agent Templates filtered.booleanisEphemeralAgentsEnabled()voidremoveCapability(@NotNull EphemeralAgentTemplate template, @NotNull String capabilityKey)voidsaveEphemeralAgentsBaseConfiguration(@NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration)Persist ephemeral agents configuration.voidsaveEphemeralAgentTemplate(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate)Saves specified Ephemeral Agent Template within the persistence layer.TestConnectionResulttestConnection(EphemeralAgentsConfiguration configuration)Validate ephemeral agents configuration and perform attempt to connect provider with provided settings.
-
-
-
Method Detail
-
getEphemeralAgentsBaseConfiguration
public EphemeralAgentsConfiguration getEphemeralAgentsBaseConfiguration()
- Specified by:
getEphemeralAgentsBaseConfigurationin interfaceEphemeralAgentsService- Returns:
- ephemeral agents configuration
-
saveEphemeralAgentsBaseConfiguration
public void saveEphemeralAgentsBaseConfiguration(@NotNull @NotNull EphemeralAgentsConfiguration ephemeralAgentsConfiguration) throws WebValidationExceptionDescription 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
public TestConnectionResult testConnection(EphemeralAgentsConfiguration configuration)
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
@NotNull public @NotNull List<EphemeralAgentTemplate> 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
@NotNull public @NotNull Optional<EphemeralAgentTemplate> getEphemeralAgentTemplate(long id)
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
-
saveEphemeralAgentTemplate
public void saveEphemeralAgentTemplate(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate) throws TemplateValidationException, org.springframework.dao.DataIntegrityViolationExceptionDescription copied from interface:EphemeralAgentsServiceSaves specified Ephemeral Agent Template within the persistence layer.- Specified by:
saveEphemeralAgentTemplatein interfaceEphemeralAgentsService- Parameters:
ephemeralAgentTemplate- entity to save- Throws:
TemplateValidationExceptionorg.springframework.dao.DataIntegrityViolationException
-
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
public 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)- Specified by:
addOrUpdateCapabilityin interfaceEphemeralAgentsService
-
removeCapability
public void removeCapability(@NotNull @NotNull EphemeralAgentTemplate template, @NotNull @NotNull String capabilityKey)- Specified by:
removeCapabilityin interfaceEphemeralAgentsService
-
-