All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hidetake.groovy.ssh.session.execution.SudoSettings.groovy Maven / Gradle / Ivy

There is a newer version: 2.11.2
Show newest version
package org.hidetake.groovy.ssh.session.execution

import groovy.transform.EqualsAndHashCode
import org.hidetake.groovy.ssh.core.settings.SettingsHelper
import org.hidetake.groovy.ssh.core.settings.ToStringProperties

trait SudoSettings {
    /**
     * Sudo password.
     */
    String sudoPassword

    /**
     * Sudo executable path.
     */
    String sudoPath

    /**
     * An input stream to send to the standard input.
     * @see org.hidetake.groovy.ssh.operation.CommandSettings#inputStream
     */
    def inputStream


    @EqualsAndHashCode
    static class With implements SudoSettings, ToStringProperties {
        def With() {}
        def With(SudoSettings... sources) {
            SettingsHelper.mergeProperties(this, sources)
        }

        static final SudoSettings DEFAULT = new SudoSettings.With(
                sudoPassword: null,
                sudoPath: 'sudo',
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy