Class S3ArtifactHandlerConfigurator
java.lang.Object
com.atlassian.bamboo.build.artifact.handlers.AbstractArtifactHandlerConfigurator
com.atlassian.bamboo.build.artifact.S3ArtifactHandlerConfigurator
- All Implemented Interfaces:
ArtifactHandlerConfigurator
,InitablePluginModule<ArtifactHandlerModuleDescriptor>
,BambooPluginModule
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
S3 artifact handler can use EC2 AWS credentials or use its own set. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.atlassian.bamboo.build.artifact.handlers.AbstractArtifactHandlerConfigurator
NON_SHARED_ARTIFACT_OPTION_NAME, SHARED_ARTIFACT_OPTION_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbeforeSave
(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.protected com.amazonaws.services.s3.AmazonS3
getAmazonS3
(@Nullable com.amazonaws.regions.Region region, @NotNull com.amazonaws.auth.AWSCredentials awsCredentials) getArtifactHandlerConfiguration
(@NotNull Map<String, String> configuration) Filter out the current configuration of the artifact handler from the given map.getEncryptedArtifactHandlerConfiguration
(@NotNull Map<String, String> configuration) Filter out configuration of the artifact handler from the given map and encrypt sensitive field values.boolean
isConfigurationComplete
(@NotNull Map<String, String> artifactHandlersConfiguration) 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 com.atlassian.bamboo.build.artifact.handlers.AbstractArtifactHandlerConfigurator
getConfigurationKey, init
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
-
Field Details
-
S3_STORAGE_PROPERTIES_PREFIX
- See Also:
-
CONF_ACCESS_KEY_ID
- See Also:
-
CONF_SECRET_ACCESS_KEY
- See Also:
-
CONF_BUCKET_NAME
- See Also:
-
CONF_BUCKET_PATH
- See Also:
-
CONF_REGION
- See Also:
-
CONF_CREDENTIALS_SOURCE
- See Also:
-
CONF_CREDENTIALS_SOURCE_OPTIONS
- See Also:
-
CONF_MAX_ARTIFACT_FILE_COUNT
- See Also:
-
EC2_PROFILE_CONFIGURED
- See Also:
-
SKIP_BUCKET_VALIDATION
- See Also:
-
-
Constructor Details
-
S3ArtifactHandlerConfigurator
public S3ArtifactHandlerConfigurator()
-
-
Method Details
-
populateContextForEdit
- Specified by:
populateContextForEdit
in interfaceArtifactHandlerConfigurator
- Overrides:
populateContextForEdit
in classAbstractArtifactHandlerConfigurator
-
postProcessConfiguration
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
- Overrides:
postProcessConfiguration
in classAbstractArtifactHandlerConfigurator
-
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
- Overrides:
decorateConfigurationForRuntime
in classAbstractArtifactHandlerConfigurator
- 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
- Overrides:
validateConfiguration
in classAbstractArtifactHandlerConfigurator
- 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> artifactHandlersConfiguration) Description copied from interface:ArtifactHandlerConfigurator
Validate if configuration of the artifact handler is complete- Specified by:
isConfigurationComplete
in interfaceArtifactHandlerConfigurator
- Overrides:
isConfigurationComplete
in classAbstractArtifactHandlerConfigurator
- Parameters:
artifactHandlersConfiguration
- configuration to be validated
-
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
- Overrides:
getArtifactHandlerConfiguration
in classAbstractArtifactHandlerConfigurator
- Parameters:
configuration
- - artifact handlers configuration data- Returns:
- Subset of given configuration that is only relevant to this artifact handler's current configuration
-
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
- Overrides:
getEncryptedArtifactHandlerConfiguration
in classAbstractArtifactHandlerConfigurator
- Parameters:
configuration
- - artifact handlers configuration data- Returns:
- Subset of given configuration that is only relevant to this artifact handler
-
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
- Overrides:
beforeSave
in classAbstractArtifactHandlerConfigurator
- Parameters:
artifactHandlersConfigurationBeforeSave
- updated configurationexistingArtifactHandlersConfiguration
- existing configuration- Returns:
- collection of messages which should be shown to user after configuration saving
-
getAmazonS3
protected com.amazonaws.services.s3.AmazonS3 getAmazonS3(@Nullable @Nullable com.amazonaws.regions.Region region, @NotNull @NotNull com.amazonaws.auth.AWSCredentials awsCredentials)
-