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 Detail

      • getConfiguration

        @NotNull
        @NotNull Map<String,​String> getConfiguration()
        Get artifact handlers configuration
        Returns:
        copy of 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
      • 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 parameter configuration that are irrelevant to the given artifactHandlerKey will be ignored.
        Parameters:
        artifactHandlerKey - Key of the artifact handler to be updated
        configuration - configuration of the artifact handler
        Throws:
        WebValidationException