Change ListProfiles class to interface

This commit is contained in:
Paul Schaub 2023-04-11 15:27:23 +02:00
parent 83a003e80f
commit 0ed5c52f4b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 8 additions and 8 deletions

View file

@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
public class ListProfilesExternal extends ListProfiles { public class ListProfilesExternal implements ListProfiles {
private final List<String> commandList = new ArrayList<>(); private final List<String> commandList = new ArrayList<>();
private final List<String> envList; private final List<String> envList;

View file

@ -405,6 +405,10 @@ public abstract class SOPGPException extends RuntimeException {
super(); super();
} }
public UnsupportedProfile(String errorMessage) {
super(errorMessage);
}
@Override @Override
public int getExitCode() { public int getExitCode() {
return EXIT_CODE; return EXIT_CODE;

View file

@ -6,14 +6,10 @@ package sop.operation;
import java.util.List; import java.util.List;
public abstract class ListProfiles { public interface ListProfiles {
public ListProfiles() { List<String> ofCommand(String command);
} List<String> global();
public abstract List<String> ofCommand(String command);
public abstract List<String> global();
} }