public class S3ArtifactHandlerConfigurator extends AbstractArtifactHandlerConfigurator
Modifier and Type | Class and Description |
---|---|
static class |
S3ArtifactHandlerConfigurator.AwsCredentialsSource
S3 artifact handler can use EC2 AWS credentials or use its own set.
|
Modifier and Type | Field and Description |
---|---|
static String |
CONF_ACCESS_KEY_ID |
static String |
CONF_BUCKET_NAME |
static String |
CONF_BUCKET_PATH |
static String |
CONF_CREDENTIALS_SOURCE |
static String |
CONF_CREDENTIALS_SOURCE_OPTIONS |
static String |
CONF_MAX_ARTIFACT_FILE_COUNT |
static String |
CONF_REGION |
static String |
CONF_SECRET_ACCESS_KEY |
static String |
EC2_PROFILE_CONFIGURED |
static String |
S3_STORAGE_PROPERTIES_PREFIX |
static String |
SKIP_BUCKET_VALIDATION |
NON_SHARED_ARTIFACT_OPTION_NAME, SHARED_ARTIFACT_OPTION_NAME
Constructor and Description |
---|
S3ArtifactHandlerConfigurator() |
Modifier and Type | Method and 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.
|
protected com.amazonaws.services.s3.AmazonS3 |
getAmazonS3(@Nullable com.amazonaws.regions.Region region,
@NotNull com.amazonaws.auth.AWSCredentials awsCredentials) |
Map<String,String> |
getArtifactHandlerConfiguration(@NotNull Map<String,String> configuration)
Filter out configuration of the artifact handler from the given map.
|
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.
|
boolean |
isConfigurationComplete(@NotNull Map<String,String> artifactHandlersConfiguration)
Validate if configuration of the artifact handler is complete
|
void |
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.
|
getConfigurationKey, init
public static final String S3_STORAGE_PROPERTIES_PREFIX
public static final String CONF_ACCESS_KEY_ID
public static final String CONF_SECRET_ACCESS_KEY
public static final String CONF_BUCKET_NAME
public static final String CONF_BUCKET_PATH
public static final String CONF_REGION
public static final String CONF_CREDENTIALS_SOURCE
public static final String CONF_CREDENTIALS_SOURCE_OPTIONS
public static final String CONF_MAX_ARTIFACT_FILE_COUNT
public static final String EC2_PROFILE_CONFIGURED
public static final String SKIP_BUCKET_VALIDATION
public void populateContextForEdit(@NotNull @NotNull Map<String,Object> context)
populateContextForEdit
in interface ArtifactHandlerConfigurator
populateContextForEdit
in class AbstractArtifactHandlerConfigurator
public void postProcessConfiguration(ActionParametersMap actionParametersMap)
ArtifactHandlerConfigurator
postProcessConfiguration
in interface ArtifactHandlerConfigurator
postProcessConfiguration
in class AbstractArtifactHandlerConfigurator
public void decorateConfigurationForRuntime(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
ArtifactHandlerConfigurator
decorateConfigurationForRuntime
in interface ArtifactHandlerConfigurator
decorateConfigurationForRuntime
in class AbstractArtifactHandlerConfigurator
artifactHandlersConfiguration
- artifact handlers configuration mappublic void validateConfiguration(@NotNull @NotNull Map<String,String> newArtifactHandlersConfiguration, @NotNull @NotNull Map<String,String> oldArtifactHandlersConfiguration, @NotNull @NotNull ErrorCollection errorCollection)
ArtifactHandlerConfigurator
validateConfiguration
in interface ArtifactHandlerConfigurator
validateConfiguration
in class AbstractArtifactHandlerConfigurator
newArtifactHandlersConfiguration
- new configuration to be validatedoldArtifactHandlersConfiguration
- existing configurationerrorCollection
- error collection to be set on validation failurepublic boolean isConfigurationComplete(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
ArtifactHandlerConfigurator
isConfigurationComplete
in interface ArtifactHandlerConfigurator
isConfigurationComplete
in class AbstractArtifactHandlerConfigurator
artifactHandlersConfiguration
- configuration to be validatedpublic Map<String,String> getArtifactHandlerConfiguration(@NotNull @NotNull Map<String,String> configuration)
ArtifactHandlerConfigurator
getArtifactHandlerConfiguration
in interface ArtifactHandlerConfigurator
getArtifactHandlerConfiguration
in class AbstractArtifactHandlerConfigurator
public Map<String,String> getEncryptedArtifactHandlerConfiguration(@NotNull @NotNull Map<String,String> configuration)
ArtifactHandlerConfigurator
getEncryptedArtifactHandlerConfiguration
in interface ArtifactHandlerConfigurator
getEncryptedArtifactHandlerConfiguration
in class AbstractArtifactHandlerConfigurator
public MessageCollection beforeSave(Map<String,String> artifactHandlersConfigurationBeforeSave, Map<String,String> existingArtifactHandlersConfiguration)
ArtifactHandlerConfigurator
beforeSave
in interface ArtifactHandlerConfigurator
beforeSave
in class AbstractArtifactHandlerConfigurator
artifactHandlersConfigurationBeforeSave
- updated configurationexistingArtifactHandlersConfiguration
- existing configurationprotected com.amazonaws.services.s3.AmazonS3 getAmazonS3(@Nullable @Nullable com.amazonaws.regions.Region region, @NotNull @NotNull com.amazonaws.auth.AWSCredentials awsCredentials)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.