Class SsmActionBase
java.lang.Object
org.jpos.q2.cli.ssm.SsmActionBase
- All Implemented Interfaces:
CLICommand
Provides base for most SSM based commands. The exec method wraps the processing for derived classes.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor; no instance state to initialise. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancheckUsage(CLIContext cli, String[] strings) Validates the command-line arguments before any side effects, returningfalseto abort the command (the implementation should print its own usage message).protected abstract voiddoCommand(CLIContext cli, JCESecurityModule sm, short keyLength, String[] strings) Performs the actual SSM operation againstsm.voidexec(CLIContext cli, String[] strings) Executes the CLI command.
-
Constructor Details
-
SsmActionBase
protected SsmActionBase()Default constructor; no instance state to initialise.
-
-
Method Details
-
checkUsage
Validates the command-line arguments before any side effects, returningfalseto abort the command (the implementation should print its own usage message).- Parameters:
cli- CLI contextstrings- command-line tokens- Returns:
truewhen the arguments are acceptable
-
doCommand
protected abstract void doCommand(CLIContext cli, JCESecurityModule sm, short keyLength, String[] strings) throws SMException Performs the actual SSM operation againstsm.- Parameters:
cli- CLI contextsm- resolved security modulekeyLength- resolved key length in bitsstrings- command-line tokens- Throws:
SMException- if the security module operation fails
-
exec
Description copied from interface:CLICommandExecutes the CLI command.- Specified by:
execin interfaceCLICommand- Parameters:
cli- the CLI contextstrings- command arguments- Throws:
Exception- on error
-