Package eu.europa.ec.taxud.dac8.vm.utils
Class HandlerUtils
java.lang.Object
eu.europa.ec.taxud.dac8.vm.utils.HandlerUtils
The type Handler utils.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.commons.cli.OptionsbuildCommandLineOptions(List<ValidationOption> validationOptions) Build DAC8 VM command line expected parameters list.static StringExtract trailing digits string.static voidhandleExcludedRules(org.apache.commons.cli.CommandLine line, eu.europa.ec.taxud.validation.ValidationContext context) Handle excluded rules.static voidinitArgsInContext(Map<eu.europa.ec.taxud.validation.utils.ArgumentsConstants.ArgumentValidation, String> argumentMap, eu.europa.ec.taxud.validation.ValidationContext context) static org.apache.commons.cli.CommandLineparseCommandLine(org.apache.commons.cli.Options options, String[] args) Parse command line command line.static FileParses the user input provided in the console.static org.apache.commons.cli.CommandLineprocessArgs(org.apache.commons.cli.Options options, String[] args) Process args command line.static FileRead file file.
-
Method Details
-
processArgs
public static org.apache.commons.cli.CommandLine processArgs(org.apache.commons.cli.Options options, String[] args) Process args command line.- Parameters:
options- the optionsargs- the args- Returns:
- the command line
-
parseCommandLine
public static org.apache.commons.cli.CommandLine parseCommandLine(org.apache.commons.cli.Options options, String[] args) throws org.apache.commons.cli.ParseException Parse command line command line.- Parameters:
options- the optionsargs- the args- Returns:
- the command line
- Throws:
org.apache.commons.cli.ParseException- the parse exception
-
parseStdInToFile
Parses the user input provided in the console.- Returns:
- the file
- Throws:
IOException- Signals that an I/O exception has occurred.
-
readFile
Read file file.- Parameters:
filePath- the file path- Returns:
- the file
-
buildCommandLineOptions
public static org.apache.commons.cli.Options buildCommandLineOptions(List<ValidationOption> validationOptions) Build DAC8 VM command line expected parameters list. See OptionType for the description of the available options for the command line.- Returns:
- the command line options
-
initArgsInContext
-
handleExcludedRules
public static void handleExcludedRules(org.apache.commons.cli.CommandLine line, eu.europa.ec.taxud.validation.ValidationContext context) Handle excluded rules.- Parameters:
line- the linecontext- the context
-
extractTrailingDigits
Extract trailing digits string.- Parameters:
s- the s- Returns:
- the string
-