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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Getter to check if the--force
flag 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.boolean
Checks if the path for the bitmap image is for a valid file and if it exists.boolean
Checks 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
String
with 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
String
with the path passed as an argument
-
forceDisabled
public boolean forceDisabled()Getter to check if the--force
flag has been enabled.- Returns:
true
if--force
is disabled,false
if enabled
-
isBmpFileValid
public boolean isBmpFileValid()Checks if the path for the bitmap image is for a valid file and if it exists.- Returns:
true
if the file is valid,false
if not
-
isMessageFileValid
public boolean isMessageFileValid()Checks if the path for the message file is for a valid file and if it exists.- Returns:
true
if the file is valid,false
if not
-