Class BaseGetConfigSourceConfigurationCommand<C extends ConfigSourceConfiguration>
- java.lang.Object
-
- fish.payara.nucleus.microprofile.config.source.extension.BaseGetConfigSourceConfigurationCommand<C>
-
- All Implemented Interfaces:
AdminCommand
- Direct Known Subclasses:
GetAWSSecretsConfigSourceConfigurationCommand
,GetAzureSecretsConfigSourceConfigurationCommand
,GetDynamoDBConfigSourceConfigurationCommand
,GetGCPSecretsConfigSourceConfigurationCommand
,GetHashiCorpSecretsConfigSourceConfigurationCommand
,GetLDAPConfigSourceConfiguration
public abstract class BaseGetConfigSourceConfigurationCommand<C extends ConfigSourceConfiguration> extends Object implements AdminCommand
The base admin command to get the configuration of a specified config source. Extend this class to fetch custom config source configuration options.- Author:
- mertcaliskan, Matthew Gill
-
-
Field Summary
Fields Modifier and Type Field Description protected org.glassfish.hk2.api.ServiceLocator
habitat
-
Constructor Summary
Constructors Constructor Description BaseGetConfigSourceConfigurationCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(AdminCommandContext context)
Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter valuesprotected Map<String,Object>
getConfigSourceConfiguration(C configuration)
protected Map<String,Object>
getConfigSourceProperties(C configuration)
Get a camelcase version ofgetConfigSourceConfiguration(ConfigSourceConfiguration)
.protected String
listConfiguration(C configuration)
-
-
-
Method Detail
-
execute
public void execute(AdminCommandContext context)
Description copied from interface:AdminCommand
Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter values- Specified by:
execute
in interfaceAdminCommand
- Parameters:
context
- information
-
listConfiguration
protected String listConfiguration(C configuration)
- Parameters:
configuration
- the configuration to print- Returns:
- A column formatted string representing the configuration
- See Also:
#getConfigSourceConfiguration(PayaraConfigSourceConfiguration)
-
getConfigSourceConfiguration
protected Map<String,Object> getConfigSourceConfiguration(C configuration)
- Parameters:
configuration
- the configuration to get properties from- Returns:
- a map from user readable attribute names to their values
-
getConfigSourceProperties
protected Map<String,Object> getConfigSourceProperties(C configuration)
Get a camelcase version ofgetConfigSourceConfiguration(ConfigSourceConfiguration)
. By default will callgetConfigSourceConfiguration(ConfigSourceConfiguration)
and convert the keys to camel casing. Override if the result of this method is wrong.- Parameters:
configuration
- the configuration to get properties from- Returns:
- a map from camelcase attribute names to their values
-
-