public abstract class AbstractCredentialType extends Object implements CredentialType
| Modifier and Type | Field and Description |
|---|---|
static String |
CFG_CREDENTIALS_NAME |
protected com.opensymphony.xwork2.TextProvider |
textProvider |
| Constructor and Description |
|---|
AbstractCredentialType() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull Map<String,String> |
generateCredentialsConfigMap(@NotNull Map<String,String> params)
Convert the given map into a config map of the shared credential to be stored in the database.
|
@NotNull Map<String,String> |
getCredentialsConfigurationMap(@NotNull CredentialsData credentialsData)
Convert an existing
CredentialsData to a map. |
void |
init(@NotNull CredentialTypeModuleDescriptor moduleDescriptor)
Initialises the Plugin with the plugin module descriptor
|
void |
populateContextForCreate(@NotNull Map<String,Object> context)
Provide any required context to be used when rendering the freemarker template for creating credentials.
|
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.
|
void |
setTextProvider(com.opensymphony.xwork2.TextProvider textProvider) |
void |
validate(@NotNull ActionParametersMap params,
@Nullable CredentialsData previousCredentialsData,
@NotNull ErrorCollection errorCollection)
Validate configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateCredentialsConfigMappublic static final String CFG_CREDENTIALS_NAME
protected com.opensymphony.xwork2.TextProvider textProvider
public void init(@NotNull
@NotNull CredentialTypeModuleDescriptor moduleDescriptor)
InitablePluginModuleinit in interface InitablePluginModule<CredentialTypeModuleDescriptor>moduleDescriptor - Plugin module descriptorpublic void populateContextForCreate(@NotNull
@NotNull Map<String,Object> context)
CredentialTypepopulateContextForCreate in interface CredentialTypecontext - map to put your context in.public void populateContextForEdit(@NotNull
@NotNull Map<String,Object> context,
@NotNull
@NotNull CredentialsData previousCredentialsData)
CredentialTypepopulateContextForEdit in interface CredentialTypecontext - map to put your context in.previousCredentialsData - existing credentialspublic void validate(@NotNull
@NotNull ActionParametersMap params,
@Nullable
@Nullable CredentialsData previousCredentialsData,
@NotNull
@NotNull ErrorCollection errorCollection)
CredentialTypevalidate in interface CredentialTypeparams - configuration to be validatedpreviousCredentialsData - the previous immutable CredentialsData before saving or null if
credentials are being created.errorCollection - error collection to be set on validation failurepublic void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
@NotNull public @NotNull Map<String,String> getCredentialsConfigurationMap(@NotNull @NotNull CredentialsData credentialsData)
CredentialTypeCredentialsData to a map. So that configuration of the credential can used by other
component, e.g. the rest plugin. Each implementation of CredentialType should populate different data to
the map and encrypt them if necessary.getCredentialsConfigurationMap in interface CredentialTypecredentialsData - an existing credential@NotNull public @NotNull Map<String,String> generateCredentialsConfigMap(@NotNull @NotNull Map<String,String> params) throws WebValidationException
CredentialTypeSensitive parameters such as passwords do not have to be encrypted, as they will be secured before being stored in the database.
generateCredentialsConfigMap in interface CredentialTypeparams - original map to be convertedWebValidationException - if params contains invalid configurationCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.