Interface ArtifactHandlersService
- All Known Implementing Classes:
ArtifactHandlersServiceImpl
@Internal
public interface ArtifactHandlersService
Service for configuring Artifact Handlers. This service is intended to be used server side only.
- Since:
- 5.9
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifactHandlerConfigurationWithoutPrefix
(@NotNull String artifactHandlerKey) Get configuration a specific artifact handler.@NotNull List<ArtifactHandlerConfigurator>
Get configurators for enabled artifact handlers@NotNull List<ArtifactHandlerModuleDescriptor>
Get list of module descriptors for enabled artifact handlers.@NotNull List<ArtifactHandlerModuleDescriptor>
Get the list of configurable by users module descriptors for enabled artifact handlers.Get artifact handlers configurationSelected artifact handler stored in configuration as artifactHandler.getConfigurationPrefix + ":enabledForShared" key with "true" value*getEncryptedArtifactHandlerConfigurationWithoutPrefix
(@NotNull String artifactHandlerKey) Get configuration a specific artifact handler.Get artifact handlers configuration for runtime.saveConfiguration
(@NotNull Map<String, String> configuration) Persist artifact handlers configurationvoid
updateArtifactHandlerConfiguration
(@NotNull String artifactHandlerKey, @NotNull Map<String, String> configuration) Update configuration of the given artifact handler.validateConfiguration
(@NotNull Map<String, String> artifactHandlerConfigurationToSave) Validate configuration of all handlersvalidateConfiguration
(@NotNull Map<String, String> configuration, @NotNull ArtifactHandlerModuleDescriptor descriptor) Validate configuration of a single handler
-
Method Details
-
getConfiguration
Get artifact handlers configuration- Returns:
- copy of artifact handlers configuration
-
getRuntimeConfiguration
Get artifact handlers configuration for runtime.Runtime configuration might be different from standard
configuration
. EachArtifactHandler
can have the configuration decorated by it's configurator implementation ofArtifactHandlerConfigurator.decorateConfigurationForRuntime(Map)
.- Returns:
- runtime artifact handlers configuration
-
getEnabledArtifactHandlerKeys
Selected artifact handler stored in configuration as artifactHandler.getConfigurationPrefix + ":enabledForShared" key with "true" value* -
saveConfiguration
Persist artifact handlers configuration- Returns:
- message collection with feedback from Artifact Handlers
-
getArtifactHandlerConfigurators
Get configurators for enabled artifact handlers -
getArtifactHandlerModuleDescriptors
Get list of module descriptors for enabled artifact handlers. -
getArtifactHandlerModuleDescriptorsAccessibleForUsers
@NotNull @NotNull List<ArtifactHandlerModuleDescriptor> getArtifactHandlerModuleDescriptorsAccessibleForUsers()Get the list of configurable by users module descriptors for enabled artifact handlers. This list does not contain handlers used internally by Bamboo, only the ones that can be selected by the user.- Since:
- 9.1
-
validateConfiguration
ErrorCollection validateConfiguration(@NotNull @NotNull Map<String, String> artifactHandlerConfigurationToSave) Validate configuration of all handlers -
validateConfiguration
ErrorCollection validateConfiguration(@NotNull @NotNull Map<String, String> configuration, @NotNull @NotNull ArtifactHandlerModuleDescriptor descriptor) Validate configuration of a single handler- Since:
- 9.1
-
getEncryptedArtifactHandlerConfigurationWithoutPrefix
Map<String,String> getEncryptedArtifactHandlerConfigurationWithoutPrefix(@NotNull @NotNull String artifactHandlerKey) Get configuration a specific artifact handler. Strip the arftifact handler prefix from the keys. E.g. instead of using custom.artifactHandlers.ServerLocalArtifactHandler.enabledForShared as key, use enabledForShared. Secret fields values will be encrypted.- Parameters:
artifactHandlerKey
- Key of the artifact handler to be retrieved- Returns:
- configuration of the given artifact handler
-
getArtifactHandlerConfigurationWithoutPrefix
Map<String,String> getArtifactHandlerConfigurationWithoutPrefix(@NotNull @NotNull String artifactHandlerKey) Get configuration a specific artifact handler. Strip the arftifact handler prefix from the keys. E.g. instead of using custom.artifactHandlers.ServerLocalArtifactHandler.enabledForShared as key, use enabledForShared. Secret fields will not be encrypted.- Parameters:
artifactHandlerKey
- Key of the artifact handler to be retrieved- Returns:
- configuration of the given artifact handler
-
updateArtifactHandlerConfiguration
void updateArtifactHandlerConfiguration(@NotNull @NotNull String artifactHandlerKey, @NotNull @NotNull Map<String, String> configuration) throws WebValidationExceptionUpdate configuration of the given artifact handler. Entries in parameterconfiguration
that are irrelevant to the givenartifactHandlerKey
will be ignored.- Parameters:
artifactHandlerKey
- Key of the artifact handler to be updatedconfiguration
- configuration of the artifact handler- Throws:
WebValidationException
-