Class SystemCommandExecuterBuilder


  • public final class SystemCommandExecuterBuilder
    extends java.lang.Object
    • Method Detail

      • shell

        public SystemCommandExecuterBuilder shell​(java.lang.String... shell)
        Set the shell
        Parameters:
        shell - the shell
        Returns:
        the system command executer builder
      • user

        public SystemCommandExecuterBuilder user​(java.lang.String user)
        Set the user
        Parameters:
        user - the user
        Returns:
        the system command executer builder
      • workingPath

        public SystemCommandExecuterBuilder workingPath​(java.lang.String workingPath)
        Set the working path
        Parameters:
        workingPath - the workingPath
        Returns:
        the system command executer builder
      • environmentVariable

        public SystemCommandExecuterBuilder environmentVariable​(java.lang.String key,
                                                                java.lang.String value)
        Add an environment variable
        Parameters:
        key - the key
        value - the value
        Returns:
        the system command executer builder
      • addToCommand

        public SystemCommandExecuterBuilder addToCommand​(java.lang.String command)
        Add an additional part of the command
        Parameters:
        command - the additional part of the command
        Returns:
        the system command executer builder
      • addToCommand

        public SystemCommandExecuterBuilder addToCommand​(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
        Returns:
        the system command executer builder
      • addToCommand

        public SystemCommandExecuterBuilder addToCommand​(java.util.Map<java.lang.String,​java.lang.String> keyValueSettings,
                                                         java.lang.String keyPrefix,
                                                         boolean escapeValue)
        Add an additional part of the command, e.g. java properties
        Parameters:
        keyValueSettings - the key / value settings
        keyPrefix - the key prefix or null
        escapeValue - true to escape values
        Returns:
        the system command executer builder
      • addToCommand

        public SystemCommandExecuterBuilder addToCommand​(java.util.Map<java.lang.String,​java.lang.String> keyValueSettings,
                                                         java.lang.String keyPrefix,
                                                         boolean escapeValue,
                                                         java.util.Set<java.lang.String> senstivieSettings)
        Add an additional part of the command, e.g. java properties
        Parameters:
        keyValueSettings - the key / value settings
        keyPrefix - the key prefix or null
        escapeValue - true to escape values
        senstivieSettings - the sensitive settings
        Returns:
        the system command executer builder
      • toString

        protected java.lang.String toString​(java.util.Map<java.lang.String,​java.lang.String> map,
                                            java.lang.String keyPrefix,
                                            boolean escapeValue,
                                            java.util.Set<java.lang.String> senstivieSettings)
        Convert a list to a string
        Parameters:
        map - the map
        keyPrefix - the key prefix or null
        escapeValue - true to escape values
        senstivieSettings - the sensitive settings
        Returns:
        the string