]> nmode's Git Repositories - signal-cli/blob - src/main/java/org/asamk/signal/commands/Commands.java
Send remote delete (#593)
[signal-cli] / src / main / java / org / asamk / signal / commands / Commands.java
1 package org.asamk.signal.commands;
2
3 import java.util.HashMap;
4 import java.util.Map;
5
6 public class Commands {
7
8 private static final Map<String, Command> commands = new HashMap<>();
9
10 static {
11 addCommand("addDevice", new AddDeviceCommand());
12 addCommand("block", new BlockCommand());
13 addCommand("daemon", new DaemonCommand());
14 addCommand("getUserStatus", new GetUserStatusCommand());
15 addCommand("link", new LinkCommand());
16 addCommand("listContacts", new ListContactsCommand());
17 addCommand("listDevices", new ListDevicesCommand());
18 addCommand("listGroups", new ListGroupsCommand());
19 addCommand("listIdentities", new ListIdentitiesCommand());
20 addCommand("joinGroup", new JoinGroupCommand());
21 addCommand("quitGroup", new QuitGroupCommand());
22 addCommand("receive", new ReceiveCommand());
23 addCommand("register", new RegisterCommand());
24 addCommand("removeDevice", new RemoveDeviceCommand());
25 addCommand("remoteDelete", new RemoteDeleteCommand());
26 addCommand("removePin", new RemovePinCommand());
27 addCommand("send", new SendCommand());
28 addCommand("sendContacts", new SendContactsCommand());
29 addCommand("sendReaction", new SendReactionCommand());
30 addCommand("setPin", new SetPinCommand());
31 addCommand("trust", new TrustCommand());
32 addCommand("unblock", new UnblockCommand());
33 addCommand("unregister", new UnregisterCommand());
34 addCommand("updateAccount", new UpdateAccountCommand());
35 addCommand("updateContact", new UpdateContactCommand());
36 addCommand("updateGroup", new UpdateGroupCommand());
37 addCommand("updateProfile", new UpdateProfileCommand());
38 addCommand("uploadStickerPack", new UploadStickerPackCommand());
39 addCommand("verify", new VerifyCommand());
40 }
41
42 public static Map<String, Command> getCommands() {
43 return commands;
44 }
45
46 public static Command getCommand(String commandKey) {
47 if (!commands.containsKey(commandKey)) {
48 return null;
49 }
50 return commands.get(commandKey);
51 }
52
53 private static void addCommand(String name, Command command) {
54 commands.put(name, command);
55 }
56 }