public abstract class AbstractHandler extends Object
| Modifier and Type | Field | Description |
|---|---|---|
protected Properties |
config |
Configuration of the handler.
|
| Constructor | Description |
|---|---|
AbstractHandler() |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
initContext(ValidationContext context) |
Generic Init method to initialize the ValidationContext component (such as Validator, Reader).
|
abstract boolean |
initContext(ValidationContext context,
String[] args) |
Initialise ValidationContext based on args of command line interfaces.
|
boolean |
isApplicationDomainSupported(ValidationContext context) |
Is application domain supported by the current validation handler.
|
void |
loadConfig(String className) |
|
void |
printHelp(org.apache.commons.cli.CommandLine line,
String applicationName,
String[] args,
org.apache.commons.cli.Options options,
String cmdLineErrorMessage) |
Print help message when the command line is empty (missing required option) or when the command line
contains "-h".
|
void |
validateContext(ValidationContext context) |
Validate the current context given.
|
protected Properties config
public void printHelp(org.apache.commons.cli.CommandLine line,
String applicationName,
String[] args,
org.apache.commons.cli.Options options,
String cmdLineErrorMessage)
line - The command line to check.applicationName - The application name.args - The arguments provided by the useroptions - The options list available.cmdLineErrorMessage - The error message to display to the user.public abstract boolean initContext(ValidationContext context, String[] args)
context - the contextargs - the argumentspublic void validateContext(ValidationContext context)
context - the context to validateprotected boolean initContext(ValidationContext context) throws ValidationException
context - Validation contextValidationException - Initialisation exceptionpublic void loadConfig(String className)
public boolean isApplicationDomainSupported(ValidationContext context)
context - Validation contextCopyright © 2025. All rights reserved.