public class ArtifactHandlersServiceImpl extends Object implements ArtifactHandlersService
| Modifier and Type | Field and Description |
|---|---|
static String |
BANDANA_KEY |
static String |
ENABLED_FOR_NON_SHARED |
static String |
ENABLED_FOR_SHARED |
| Constructor and Description |
|---|
ArtifactHandlersServiceImpl() |
| Modifier and Type | Method and 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.
|
static @NotNull Predicate<com.atlassian.plugin.ModuleDescriptor<ArtifactHandler>> |
getArtifactHandlersForUsersPredicate() |
@NotNull Map<String,String> |
getConfiguration()
Get artifact handlers configuration
|
@NotNull Set<String> |
getEnabledArtifactHandlerKeys()
Selected artifact handler stores 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.
|
static boolean |
isArtifactHandlerEnabled(@NotNull ArtifactHandlerConfigurator configurator,
@NotNull Map<String,String> configuration) |
MessageCollection |
saveConfiguration(@NotNull Map<String,String> configuration)
Persist artifact handlers configuration
|
void |
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 handlers
|
ErrorCollection |
validateConfiguration(@NotNull Map<String,String> artifactHandlerConfigurationToSave,
@NotNull ArtifactHandlerModuleDescriptor descriptor)
Validate configuration of a single handler
|
public static final String BANDANA_KEY
public static final String ENABLED_FOR_SHARED
public static final String ENABLED_FOR_NON_SHARED
@NotNull public @NotNull Map<String,String> getConfiguration()
ArtifactHandlersServicegetConfiguration in interface ArtifactHandlersService@NotNull public @NotNull Map<String,String> getRuntimeConfiguration()
ArtifactHandlersService
Runtime configuration might be different from standard configuration. Each ArtifactHandler
can have the configuration decorated by it's configurator implementation of ArtifactHandlerConfigurator.decorateConfigurationForRuntime(Map).
getRuntimeConfiguration in interface ArtifactHandlersService@NotNull public @NotNull Set<String> getEnabledArtifactHandlerKeys()
getEnabledArtifactHandlerKeys in interface ArtifactHandlersServicepublic MessageCollection saveConfiguration(@NotNull @NotNull Map<String,String> configuration)
ArtifactHandlersServicesaveConfiguration in interface ArtifactHandlersServicepublic ErrorCollection validateConfiguration(@NotNull @NotNull Map<String,String> artifactHandlerConfigurationToSave)
ArtifactHandlersServicevalidateConfiguration in interface ArtifactHandlersServicepublic ErrorCollection validateConfiguration(@NotNull @NotNull Map<String,String> artifactHandlerConfigurationToSave, @NotNull @NotNull ArtifactHandlerModuleDescriptor descriptor)
ArtifactHandlersServicevalidateConfiguration in interface ArtifactHandlersServicepublic Map<String,String> getEncryptedArtifactHandlerConfigurationWithoutPrefix(@NotNull @NotNull String artifactHandlerKey)
ArtifactHandlersServicegetEncryptedArtifactHandlerConfigurationWithoutPrefix in interface ArtifactHandlersServiceartifactHandlerKey - Key of the artifact handler to be retrievedpublic Map<String,String> getArtifactHandlerConfigurationWithoutPrefix(@NotNull @NotNull String artifactHandlerKey)
ArtifactHandlersServicegetArtifactHandlerConfigurationWithoutPrefix in interface ArtifactHandlersServiceartifactHandlerKey - Key of the artifact handler to be retrievedpublic void updateArtifactHandlerConfiguration(@NotNull
@NotNull String artifactHandlerKey,
@NotNull
@NotNull Map<String,String> configuration)
throws WebValidationException
ArtifactHandlersServiceconfiguration that are irrelevant
to the given artifactHandlerKey will be ignored.updateArtifactHandlerConfiguration in interface ArtifactHandlersServiceartifactHandlerKey - Key of the artifact handler to be updatedconfiguration - configuration of the artifact handlerWebValidationException@NotNull public @NotNull List<ArtifactHandlerConfigurator> getArtifactHandlerConfigurators()
ArtifactHandlersServicegetArtifactHandlerConfigurators in interface ArtifactHandlersService@NotNull public @NotNull List<ArtifactHandlerModuleDescriptor> getArtifactHandlerModuleDescriptors()
ArtifactHandlersServicegetArtifactHandlerModuleDescriptors in interface ArtifactHandlersService@NotNull public @NotNull List<ArtifactHandlerModuleDescriptor> getArtifactHandlerModuleDescriptorsAccessibleForUsers()
ArtifactHandlersServicegetArtifactHandlerModuleDescriptorsAccessibleForUsers in interface ArtifactHandlersService@NotNull public static @NotNull Predicate<com.atlassian.plugin.ModuleDescriptor<ArtifactHandler>> getArtifactHandlersForUsersPredicate()
public static boolean isArtifactHandlerEnabled(@NotNull
@NotNull ArtifactHandlerConfigurator configurator,
@NotNull
@NotNull Map<String,String> configuration)
Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.