More polishing

This commit is contained in:
crschnick
2023-08-02 18:30:19 +00:00
parent 1f2919278f
commit 44bcdce14a
8 changed files with 65 additions and 52 deletions
@@ -49,22 +49,6 @@ public abstract class ProcessControlProvider {
.orElse(null);
}
public static ShellControl createSsh(Object sshStore) {
return INSTANCES.stream()
.map(localProcessControlProvider -> localProcessControlProvider.createSshControl(sshStore))
.filter(Objects::nonNull)
.findFirst()
.orElseThrow();
}
public static String createSshPreview(Object sshStore) {
return INSTANCES.stream()
.map(localProcessControlProvider -> localProcessControlProvider.createSshControlPreview(sshStore))
.filter(Objects::nonNull)
.findFirst()
.orElseThrow();
}
public abstract ShellControl sub(
ShellControl parent,
@NonNull FailableFunction<ShellControl, String, Exception> commandFunction,
@@ -77,7 +61,4 @@ public abstract class ProcessControlProvider {
public abstract ShellControl createLocalProcessControl(boolean stoppable);
public abstract ShellControl createSshControl(Object sshStore);
public abstract String createSshControlPreview(Object sshStore);
}
@@ -94,8 +94,6 @@ public interface ShellControl extends ProcessControl {
OsType getOsType();
boolean checkCanElevate() throws Exception;
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction);
default ShellControl elevationPassword(SecretValue value) {