Class AbstractArtifactHandlerConfigurator
- java.lang.Object
-
- com.atlassian.bamboo.build.artifact.handlers.AbstractArtifactHandlerConfigurator
-
- All Implemented Interfaces:
ArtifactHandlerConfigurator
,InitablePluginModule<ArtifactHandlerModuleDescriptor>
,BambooPluginModule
- Direct Known Subclasses:
AgentLocalArtifactHandlerConfigurator
,S3ArtifactHandlerConfigurator
,ServerLocalArtifactHandlerConfigurator
public abstract class AbstractArtifactHandlerConfigurator extends Object implements ArtifactHandlerConfigurator
-
-
Field Summary
Fields Modifier and Type Field Description static String
NON_SHARED_ARTIFACT_OPTION_NAME
static String
SHARED_ARTIFACT_OPTION_NAME
-
Constructor Summary
Constructors Constructor Description AbstractArtifactHandlerConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageCollection
beforeSave(Map<String,String> artifactHandlersConfigurationBeforeSave, Map<String,String> existingArtifactHandlersConfiguration)
Pre save action handler, allows to gather feedback from configurator before artifact handler configuration saving.void
decorateConfigurationForRuntime(@NotNull Map<String,String> artifactHandlersConfiguration)
Decorate artifact handlers configuration for runtime.Map<String,String>
getArtifactHandlerConfiguration(@NotNull Map<String,String> configuration)
Filter out the current configuration of the artifact handler from the given map.@NotNull String
getConfigurationKey(@NotNull String key)
For a provided suffix return full configuration key.Map<String,String>
getEncryptedArtifactHandlerConfiguration(@NotNull Map<String,String> configuration)
Filter out configuration of the artifact handler from the given map and encrypt sensitive field values.void
init(@NotNull ArtifactHandlerModuleDescriptor moduleDescriptor)
Initialises the Plugin with the plugin module descriptorboolean
isConfigurationComplete(@NotNull Map<String,String> configuration)
Validate if configuration of the artifact handler is completevoid
populateContextForEdit(@NotNull Map<String,Object> context)
void
postProcessConfiguration(ActionParametersMap actionParametersMap)
Any configuration adjustments that need to happen before configuration is saved should be done here.void
validateConfiguration(@NotNull Map<String,String> newArtifactHandlersConfiguration, @NotNull Map<String,String> oldArtifactHandlersConfiguration, @NotNull ErrorCollection errorCollection)
Validate configuration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.build.artifact.handlers.ArtifactHandlerConfigurator
getRawArtifactHandlerConfigurationData
-
-
-
-
Method Detail
-
init
public void init(@NotNull @NotNull ArtifactHandlerModuleDescriptor moduleDescriptor)
Description copied from interface:InitablePluginModule
Initialises the Plugin with the plugin module descriptor- Specified by:
init
in interfaceInitablePluginModule<ArtifactHandlerModuleDescriptor>
- Parameters:
moduleDescriptor
- Plugin module descriptor
-
postProcessConfiguration
public void postProcessConfiguration(ActionParametersMap actionParametersMap)
Description copied from interface:ArtifactHandlerConfigurator
Any configuration adjustments that need to happen before configuration is saved should be done here.- Specified by:
postProcessConfiguration
in interfaceArtifactHandlerConfigurator
-
populateContextForEdit
public void populateContextForEdit(@NotNull @NotNull Map<String,Object> context)
- Specified by:
populateContextForEdit
in interfaceArtifactHandlerConfigurator
-
getConfigurationKey
@NotNull public @NotNull String getConfigurationKey(@NotNull @NotNull String key)
Description copied from interface:ArtifactHandlerConfigurator
For a provided suffix return full configuration key.- Specified by:
getConfigurationKey
in interfaceArtifactHandlerConfigurator
-
decorateConfigurationForRuntime
public void decorateConfigurationForRuntime(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
Description copied from interface:ArtifactHandlerConfigurator
Decorate artifact handlers configuration for runtime. Implement this method to append any necessary properties which were not persisted in handler configuration.- Specified by:
decorateConfigurationForRuntime
in interfaceArtifactHandlerConfigurator
- Parameters:
artifactHandlersConfiguration
- artifact handlers configuration map
-
validateConfiguration
public void validateConfiguration(@NotNull @NotNull Map<String,String> newArtifactHandlersConfiguration, @NotNull @NotNull Map<String,String> oldArtifactHandlersConfiguration, @NotNull @NotNull ErrorCollection errorCollection)
Description copied from interface:ArtifactHandlerConfigurator
Validate configuration.- Specified by:
validateConfiguration
in interfaceArtifactHandlerConfigurator
- Parameters:
newArtifactHandlersConfiguration
- new configuration to be validatedoldArtifactHandlersConfiguration
- existing configurationerrorCollection
- error collection to be set on validation failure
-
isConfigurationComplete
public boolean isConfigurationComplete(@NotNull @NotNull Map<String,String> configuration)
Description copied from interface:ArtifactHandlerConfigurator
Validate if configuration of the artifact handler is complete- Specified by:
isConfigurationComplete
in interfaceArtifactHandlerConfigurator
- Parameters:
configuration
- configuration to be validated
-
getEncryptedArtifactHandlerConfiguration
public Map<String,String> getEncryptedArtifactHandlerConfiguration(@NotNull @NotNull Map<String,String> configuration)
Description copied from interface:ArtifactHandlerConfigurator
Filter out configuration of the artifact handler from the given map and encrypt sensitive field values.- Specified by:
getEncryptedArtifactHandlerConfiguration
in interfaceArtifactHandlerConfigurator
- Parameters:
configuration
- - artifact handlers configuration data- Returns:
- Subset of given configuration that is only relevant to this artifact handler
-
getArtifactHandlerConfiguration
public Map<String,String> getArtifactHandlerConfiguration(@NotNull @NotNull Map<String,String> configuration)
Description copied from interface:ArtifactHandlerConfigurator
Filter out the current configuration of the artifact handler from the given map. Don't include data that are not currently used- Specified by:
getArtifactHandlerConfiguration
in interfaceArtifactHandlerConfigurator
- Parameters:
configuration
- - artifact handlers configuration data- Returns:
- Subset of given configuration that is only relevant to this artifact handler's current configuration
-
beforeSave
public MessageCollection beforeSave(Map<String,String> artifactHandlersConfigurationBeforeSave, Map<String,String> existingArtifactHandlersConfiguration)
Description copied from interface:ArtifactHandlerConfigurator
Pre save action handler, allows to gather feedback from configurator before artifact handler configuration saving.- Specified by:
beforeSave
in interfaceArtifactHandlerConfigurator
- Parameters:
artifactHandlersConfigurationBeforeSave
- updated configurationexistingArtifactHandlersConfiguration
- existing configuration- Returns:
- collection of messages which should be shown to user after configuration saving
-
-