Package ch.heigvd.dai.commands
Class Root
java.lang.Object
ch.heigvd.dai.commands.Root
Implements the root command for executing the program on a CLI.
This class defines the parameters and options that are common throughout the Hide and
Expose subcommands. For checking the usage of the command, use the --help option.
- Author:
- Pedro Alves da Silva, Gonçalo Carvalheiro Heleno
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGetter to check if the--forceflag has been enabled.Getter for the subcommands to read the path to the bitmap image passed as an argument.Getter for the subcommands to read the path to the message file to be hidden passed as an argument.booleanChecks if the path for the bitmap image is for a valid file and if it exists.booleanChecks if the path for the message file is for a valid file and if it exists.
-
Field Details
-
filenameBmpImage
-
filenameMessage
-
force
private boolean force
-
-
Constructor Details
-
Root
public Root()
-
-
Method Details
-
getFilenameBmpImage
Getter for the subcommands to read the path to the bitmap image passed as an argument.- Returns:
- a
Stringwith the path passed as an argument
-
getFilenameMessage
Getter for the subcommands to read the path to the message file to be hidden passed as an argument.- Returns:
- a
Stringwith the path passed as an argument
-
forceDisabled
public boolean forceDisabled()Getter to check if the--forceflag has been enabled.- Returns:
trueif--forceis disabled,falseif enabled
-
isBmpFileValid
public boolean isBmpFileValid()Checks if the path for the bitmap image is for a valid file and if it exists.- Returns:
trueif the file is valid,falseif not
-
isMessageFileValid
public boolean isMessageFileValid()Checks if the path for the message file is for a valid file and if it exists.- Returns:
trueif the file is valid,falseif not
-