Class Root

java.lang.Object
ch.heigvd.dai.commands.Root

public class Root extends Object
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 Details

    • filenameBmpImage

      private String filenameBmpImage
    • filenameMessage

      private String filenameMessage
    • force

      private boolean force
  • Constructor Details

    • Root

      public Root()
  • Method Details

    • getFilenameBmpImage

      public String 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

      public String 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