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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,String>
getArtifactHandlerConfigurationWithoutPrefix(@NotNull String artifactHandlerKey)
Get configuration a specific artifact handler.@NotNull List<ArtifactHandlerConfigurator>
getArtifactHandlerConfigurators()
Get configurators for enabled artifact handlers@NotNull List<ArtifactHandlerModuleDescriptor>
getArtifactHandlerModuleDescriptors()
Get list of module descriptors for enabled artifact handlers.@NotNull List<ArtifactHandlerModuleDescriptor>
getArtifactHandlerModuleDescriptorsAccessibleForUsers()
Get the list of configurable by users module descriptors for enabled artifact handlers.@NotNull Map<String,String>
getConfiguration()
Get artifact handlers configuration@NotNull Set<String>
getEnabledArtifactHandlerKeys()
Selected artifact handler stored in configuration as artifactHandler.getConfigurationPrefix + ":enabledForShared" key with "true" value*Map<String,String>
getEncryptedArtifactHandlerConfigurationWithoutPrefix(@NotNull String artifactHandlerKey)
Get configuration a specific artifact handler.@NotNull Map<String,String>
getRuntimeConfiguration()
Get artifact handlers configuration for runtime.MessageCollection
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.ErrorCollection
validateConfiguration(@NotNull Map<String,String> artifactHandlerConfigurationToSave)
Validate configuration of all handlersErrorCollection
validateConfiguration(@NotNull Map<String,String> configuration, @NotNull ArtifactHandlerModuleDescriptor descriptor)
Validate configuration of a single handler
-
-
-
Method Detail
-
getConfiguration
@NotNull @NotNull Map<String,String> getConfiguration()
Get artifact handlers configuration- Returns:
- copy of artifact handlers configuration
-
getRuntimeConfiguration
@NotNull @NotNull Map<String,String> 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
@NotNull @NotNull Set<String> getEnabledArtifactHandlerKeys()
Selected artifact handler stored in configuration as artifactHandler.getConfigurationPrefix + ":enabledForShared" key with "true" value*
-
saveConfiguration
MessageCollection saveConfiguration(@NotNull @NotNull Map<String,String> configuration)
Persist artifact handlers configuration- Returns:
- message collection with feedback from Artifact Handlers
-
getArtifactHandlerConfigurators
@NotNull @NotNull List<ArtifactHandlerConfigurator> getArtifactHandlerConfigurators()
Get configurators for enabled artifact handlers
-
getArtifactHandlerModuleDescriptors
@NotNull @NotNull List<ArtifactHandlerModuleDescriptor> 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 WebValidationException
Update 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
-
-