mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
Simplify interpreter
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
package sonia.scm.protocolcommand;
|
||||
|
||||
import sonia.scm.plugin.ExtensionPoint;
|
||||
|
||||
@ExtensionPoint
|
||||
public interface CommandInterpreter {
|
||||
|
||||
boolean canHandle(String command);
|
||||
|
||||
CommandParser getParser();
|
||||
String[] getParsedArgs();
|
||||
|
||||
ScmCommandProtocol getProtocolHandler();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package sonia.scm.protocolcommand;
|
||||
|
||||
import sonia.scm.plugin.ExtensionPoint;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@ExtensionPoint
|
||||
public interface CommandInterpreterFactory {
|
||||
Optional<CommandInterpreter> canHandle(String command);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package sonia.scm.protocolcommand;
|
||||
|
||||
public interface CommandParser {
|
||||
|
||||
String[] parse(String command);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user