Class SystemCommand

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SPACE
      SPACE
    • Constructor Summary

      Constructors 
      Constructor Description
      SystemCommand()
      Constructor for SystemCommand
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String command)
      Add an additional part of the command
      void add​(java.lang.String command, java.lang.String displayCommand)
      Add an additional part of the command
      boolean equals​(java.lang.Object obj)  
      java.util.List<java.lang.String> getCommandList()
      The system command list which will be passed in the exact way to the system command.
      java.util.List<java.lang.String> getShell()
      The shell to execute.
      int hashCode()  
      void setCommandList​(java.util.List<java.lang.String> commandList)
      Set the command list
      void setShell​(java.util.List<java.lang.String> shell)
      Set the shell
      java.lang.String toString​(boolean forDisplay)
      The command as string
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SystemCommand

        public SystemCommand()
        Constructor for SystemCommand
    • Method Detail

      • setShell

        public void setShell​(java.util.List<java.lang.String> shell)
        Set the shell
        Parameters:
        shell - the shell
      • add

        public void add​(java.lang.String command)
        Add an additional part of the command
        Parameters:
        command - the additional part of the command
      • add

        public void add​(java.lang.String command,
                        java.lang.String displayCommand)
        Add an additional part of the command
        Parameters:
        command - the additional part of the command
        displayCommand - the additional part of the command to display
      • setCommandList

        public void setCommandList​(java.util.List<java.lang.String> commandList)
        Set the command list
        Parameters:
        commandList - the command list
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public java.lang.String toString​(boolean forDisplay)
        Description copied from interface: ISystemCommand
        The command as string
        Specified by:
        toString in interface ISystemCommand
        Parameters:
        forDisplay - true to prepare the arguments for display; otherwise false. This can be used to protect security relevant arguments e.g. java properties with a password
        Returns:
        the arguments as string
        See Also:
        ISystemCommand.toString(boolean)