Package com.c12e.cortex.profiles.cli
Class ValidationUtils
- java.lang.Object
-
- com.c12e.cortex.profiles.cli.ValidationUtils
-
public class ValidationUtils extends java.lang.Object
Utility class for validating CLI options and parameters.
-
-
Constructor Summary
Constructors Constructor Description ValidationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
fileMustExist(java.io.File file, picocli.CommandLine cmdSpec)
Verifies the file instance exists, otherwise raises aCommandLine.ParameterException
.static void
validWriteMode(java.lang.String writeMode, picocli.CommandLine cmdSpec)
Verifies the string writeMode is a valid option, otherwise raises aCommandLine.ParameterException
.
-
-
-
Method Detail
-
validWriteMode
public static void validWriteMode(java.lang.String writeMode, picocli.CommandLine cmdSpec)
Verifies the string writeMode is a valid option, otherwise raises aCommandLine.ParameterException
.- Parameters:
writeMode
- Value to check.cmdSpec
- CommandLine instance.
-
fileMustExist
public static void fileMustExist(java.io.File file, picocli.CommandLine cmdSpec)
Verifies the file instance exists, otherwise raises aCommandLine.ParameterException
.- Parameters:
file
- File to check.cmdSpec
- CommandLine instance.
-
-