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.Properties;
public class ListProfilesExternal extends ListProfiles {
public class ListProfilesExternal implements ListProfiles {
private final List<String> commandList = new ArrayList<>();
private final List<String> envList;

View File

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

View File

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