1 package org
.asamk
.signal
.commands
;
3 import com
.fasterxml
.jackson
.core
.type
.TypeReference
;
5 import net
.sourceforge
.argparse4j
.inf
.Namespace
;
7 import org
.asamk
.signal
.OutputType
;
8 import org
.asamk
.signal
.commands
.exceptions
.CommandException
;
9 import org
.asamk
.signal
.manager
.MultiAccountManager
;
10 import org
.asamk
.signal
.output
.JsonWriter
;
12 import java
.util
.List
;
15 public interface JsonRpcMultiLocalCommand
extends JsonRpcMultiCommand
<Map
<String
, Object
>>, MultiLocalCommand
{
17 default TypeReference
<Map
<String
, Object
>> getRequestType() {
18 return new TypeReference
<>() {};
21 default void handleCommand(
22 Map
<String
, Object
> request
, MultiAccountManager c
, JsonWriter jsonWriter
23 ) throws CommandException
{
24 Namespace commandNamespace
= new JsonRpcNamespace(request
== null ? Map
.of() : request
);
25 handleCommand(commandNamespace
, c
, jsonWriter
);
28 default List
<OutputType
> getSupportedOutputTypes() {
29 return List
.of(OutputType
.PLAIN_TEXT
, OutputType
.JSON
);