Class BaseGetNotifierConfigurationCommand<C extends PayaraNotifierConfiguration>
- java.lang.Object
-
- fish.payara.internal.notification.admin.BaseGetNotifierConfigurationCommand<C>
-
- All Implemented Interfaces:
AdminCommand
- Direct Known Subclasses:
GetCDIEventbusNotifierConfigurationCommand
,GetEventbusNotifierConfigurationCommand
,GetJmsNotifierConfigurationCommand
,GetLogNotifierConfiguration
public abstract class BaseGetNotifierConfigurationCommand<C extends PayaraNotifierConfiguration> extends Object implements AdminCommand
The base admin command to get the configuration of a specified notifier. Extend this class to fetch custom notifier 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 BaseGetNotifierConfigurationCommand()
-
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>
getNotifierConfiguration(C configuration)
protected Map<String,Object>
getNotifierProperties(C configuration)
Get a camelcase version ofgetNotifierConfiguration(PayaraNotifierConfiguration)
.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:
getNotifierConfiguration(PayaraNotifierConfiguration)
-
getNotifierConfiguration
protected Map<String,Object> getNotifierConfiguration(C configuration)
- Parameters:
configuration
- the configuration to get properties from- Returns:
- a map from user readable attribute names to their values
-
getNotifierProperties
protected Map<String,Object> getNotifierProperties(C configuration)
Get a camelcase version ofgetNotifierConfiguration(PayaraNotifierConfiguration)
. By default will callgetNotifierConfiguration(PayaraNotifierConfiguration)
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
-
-