mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Split commands into separate classes
This commit is contained in:
parent
2ab70edc68
commit
f60a10eb6e
30 changed files with 1121 additions and 742 deletions
38
src/main/java/org/asamk/signal/commands/Commands.java
Normal file
38
src/main/java/org/asamk/signal/commands/Commands.java
Normal file
|
@ -0,0 +1,38 @@
|
|||
package org.asamk.signal.commands;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Commands {
|
||||
|
||||
private static final Map<String, Command> commands = new HashMap<>();
|
||||
|
||||
static {
|
||||
addCommand("addDevice", new AddDeviceCommand());
|
||||
addCommand("daemon", new DaemonCommand());
|
||||
addCommand("link", new LinkCommand());
|
||||
addCommand("listDevices", new ListDevicesCommand());
|
||||
addCommand("listGroups", new ListGroupsCommand());
|
||||
addCommand("listIdentities", new ListIdentitiesCommand());
|
||||
addCommand("quitGroup", new QuitGroupCommand());
|
||||
addCommand("receive", new ReceiveCommand());
|
||||
addCommand("register", new RegisterCommand());
|
||||
addCommand("removeDevice", new RemoveDeviceCommand());
|
||||
addCommand("removePin", new RemovePinCommand());
|
||||
addCommand("send", new SendCommand());
|
||||
addCommand("setPin", new SetPinCommand());
|
||||
addCommand("trust", new TrustCommand());
|
||||
addCommand("unregister", new UnregisterCommand());
|
||||
addCommand("updateAccount", new UpdateAccountCommand());
|
||||
addCommand("updateGroup", new UpdateGroupCommand());
|
||||
addCommand("verify", new VerifyCommand());
|
||||
}
|
||||
|
||||
public static Map<String, Command> getCommands() {
|
||||
return commands;
|
||||
}
|
||||
|
||||
private static void addCommand(String name, Command command) {
|
||||
commands.put(name, command);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue