- try (var m = manager) {
- return command.handleCommand(ns, m);
+ }
+
+ private void handleProvisioningCommand(
+ final ProvisioningCommand command,
+ final SignalAccountFiles signalAccountFiles,
+ final CommandHandler commandHandler
+ ) throws CommandException {
+ var pm = signalAccountFiles.initProvisioningManager();
+ commandHandler.handleProvisioningCommand(command, pm);
+ }
+
+ private void handleRegistrationCommand(
+ final RegistrationCommand command,
+ final String account,
+ final SignalAccountFiles signalAccountFiles,
+ final CommandHandler commandHandler
+ ) throws CommandException {
+ try (final var rm = loadRegistrationManager(account, signalAccountFiles)) {
+ commandHandler.handleRegistrationCommand(command, rm);