com.atlassian.bamboo.credentials
Interface CredentialType

All Superinterfaces:
BambooPluginModule, InitablePluginModule<CredentialTypeModuleDescriptor>
All Known Implementing Classes:
AbstractCredentialType, SshCredentialType

public interface CredentialType
extends InitablePluginModule<CredentialTypeModuleDescriptor>

Handles shared credentials.

Since:
5.9

Method Summary
 Map<String,String> generateCredentialsConfigMap(ActionParametersMap params, CredentialsData previousCredentialsData)
          Convert the params from the ui into a config map to be stored in the database.
 void populateContextForCreate(Map<String,Object> context)
          Provide any required context to be used when rendering the freemarker template for creating credentials.
 void populateContextForEdit(Map<String,Object> context, CredentialsData previousCredentialsData)
          Provide any required context to be used when rendering the freemarker template for editing credentials.
 void validate(ActionParametersMap params, CredentialsData previousCredentialsData, ErrorCollection errorCollection)
          Validate configuration.
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 

Method Detail

populateContextForCreate

void populateContextForCreate(@NotNull
                              Map<String,Object> context)
Provide any required context to be used when rendering the freemarker template for creating credentials. Allows you to add any default values for initial creation

Parameters:
context - map to put your context in.

populateContextForEdit

void populateContextForEdit(@NotNull
                            Map<String,Object> context,
                            @NotNull
                            CredentialsData previousCredentialsData)
Provide any required context to be used when rendering the freemarker template for editing credentials.

Parameters:
context - map to put your context in.
previousCredentialsData - existing credentials

validate

void validate(@NotNull
              ActionParametersMap params,
              @Nullable
              CredentialsData previousCredentialsData,
              @NotNull
              ErrorCollection errorCollection)
Validate configuration.

Parameters:
params - configuration to be validated
previousCredentialsData - the previous immutable CredentialsData before saving or null if credentials are being created.
errorCollection - error collection to be set on validation failure

generateCredentialsConfigMap

@NotNull
Map<String,String> generateCredentialsConfigMap(@NotNull
                                                        ActionParametersMap params,
                                                        @Nullable
                                                        CredentialsData previousCredentialsData)
Convert the params from the ui into a config map to be stored in the database. Can assume validation has occurred in the #validate method. Sensitive parameters such as passwords should be encrypted by this method before being added to the map.

Parameters:
params - request parameters.
previousCredentialsData - the previous immutable CredentialsData before saving or null if credentials are being created.
Returns:
the configuration map to be stored in the database.


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.