mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[t*] Fix @ActionOutput annotations (#17666)
Related to #17636 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
eae43f26c1
commit
89e445f4f2
@ -111,7 +111,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send an answer", description = "Send a Telegram answer using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "callbackId") @Nullable String callbackId,
|
||||
@ActionInput(name = "messageId") @Nullable Long messageId,
|
||||
@ -149,7 +149,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send an answer", description = "Send a Telegram answer using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "replyId") @Nullable String replyId,
|
||||
@ActionInput(name = "message") @Nullable String message) {
|
||||
@ -177,7 +177,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send an answer", description = "Send a Telegram answer using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramAnswer(
|
||||
@ActionInput(name = "replyId") @Nullable String replyId,
|
||||
@ActionInput(name = "message") @Nullable String message) {
|
||||
TelegramHandler localHandler = handler;
|
||||
@ -192,14 +192,14 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a message", description = "Send a Telegram message using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "message") @Nullable String message) {
|
||||
return sendTelegramGeneral(chatId, message, (String) null);
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a message", description = "Send a Telegram message using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
@ActionInput(name = "message") @Nullable String message) {
|
||||
TelegramHandler localHandler = handler;
|
||||
if (localHandler != null) {
|
||||
@ -213,7 +213,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a query", description = "Send a Telegram Query using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramQuery(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramQuery(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "message") @Nullable String message,
|
||||
@ActionInput(name = "replyId") @Nullable String replyId,
|
||||
@ -222,7 +222,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a query", description = "Send a Telegram Query using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramQuery(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramQuery(
|
||||
@ActionInput(name = "message") @Nullable String message,
|
||||
@ActionInput(name = "replyId") @Nullable String replyId,
|
||||
@ActionInput(name = "buttons") @Nullable String... buttons) {
|
||||
@ -293,7 +293,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "delete a query", description = "Delete a Query using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean deleteTelegramQuery(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean deleteTelegramQuery(
|
||||
@ActionInput(name = "replyId") @Nullable String replyId) {
|
||||
if (replyId == null) {
|
||||
logger.warn("deleteTelegramQuery() - replyId not passed!");
|
||||
@ -327,7 +327,7 @@ public class TelegramActions implements ThingActions {
|
||||
} // public boolean deleteTelegramQuery(String replyId)
|
||||
|
||||
@RuleAction(label = "send a message", description = "Send a Telegram using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "message") @Nullable String message,
|
||||
@ActionInput(name = "args") @Nullable Object... args) {
|
||||
@ -338,7 +338,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a message", description = "Send a Telegram using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegram(
|
||||
@ActionInput(name = "message") @Nullable String message,
|
||||
@ActionInput(name = "args") @Nullable Object... args) {
|
||||
TelegramHandler localHandler = handler;
|
||||
@ -353,7 +353,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a photo", description = "Send a picture using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "photoURL") @Nullable String photoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
@ -361,7 +361,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a photo", description = "Send a picture using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "photoURL") @Nullable String photoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption,
|
||||
@ -465,7 +465,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a photo", description = "Send a Picture using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
@ActionInput(name = "photoURL") @Nullable String photoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption,
|
||||
@ActionInput(name = "username") @Nullable String username,
|
||||
@ -482,14 +482,14 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send a photo", description = "Send a Picture using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramPhoto(
|
||||
@ActionInput(name = "photoURL") @Nullable String photoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
return sendTelegramPhoto(photoURL, caption, null, null);
|
||||
}
|
||||
|
||||
@RuleAction(label = "send animation", description = "Send an Animation using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramAnimation(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramAnimation(
|
||||
@ActionInput(name = "animationURL") @Nullable String animationURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
TelegramHandler localHandler = handler;
|
||||
@ -504,7 +504,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send animation", description = "Send an Animation using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramAnimation(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramAnimation(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "animationURL") @Nullable String animationURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
@ -571,7 +571,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send video", description = "Send a Video using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramVideo(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramVideo(
|
||||
@ActionInput(name = "videoURL") @Nullable String videoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
TelegramHandler localHandler = handler;
|
||||
@ -586,7 +586,7 @@ public class TelegramActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "send video", description = "Send a Video using the Telegram API.")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") boolean sendTelegramVideo(
|
||||
public @ActionOutput(label = "Success", type = "java.lang.Boolean") boolean sendTelegramVideo(
|
||||
@ActionInput(name = "chatId") @Nullable Long chatId,
|
||||
@ActionInput(name = "videoURL") @Nullable String videoURL,
|
||||
@ActionInput(name = "caption") @Nullable String caption) {
|
||||
|
@ -43,7 +43,7 @@ public class TPLinkSmartHomeActions implements ThingActions, ThingHandlerService
|
||||
private @Nullable SmartHomeHandler handler;
|
||||
|
||||
@RuleAction(label = "@text/actions.tplinksmarthome.send.label", description = "@text/actions.tplinksmarthome.send.description")
|
||||
public @ActionOutput(name = "response", label = "@text/actions.tplinksmarthome.send.response.label", description = "@text/actions.tplinksmarthome.send.response.description", type = "java.lang.String") String send(
|
||||
public @ActionOutput(label = "@text/actions.tplinksmarthome.send.response.label", description = "@text/actions.tplinksmarthome.send.response.description", type = "java.lang.String") String send(
|
||||
@ActionInput(name = "command", label = "@text/actions.tplinksmarthome.send.command.label", description = "@text/actions.tplinksmarthome.send.command.description", type = "java.lang.String", required = true) final String command)
|
||||
throws IOException {
|
||||
if (handler instanceof SmartHomeHandler) {
|
||||
|
@ -62,27 +62,27 @@ public class FritzboxActions implements ThingActions {
|
||||
private @Nullable Tr064RootHandler handler;
|
||||
|
||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
public @ActionOutput(label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||
@ActionInput(name = "matches", label = "@text/phonebookLookupActionInputMatchesLabel", description = "@text/phonebookLookupActionInputMatchesDescription", type = "java.lang.Integer") @Nullable Integer matchCount) {
|
||||
return phonebookLookup(phonenumber, null, matchCount);
|
||||
}
|
||||
|
||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
public @ActionOutput(label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber) {
|
||||
return phonebookLookup(phonenumber, null, null);
|
||||
}
|
||||
|
||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
public @ActionOutput(label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||
@ActionInput(name = "phonebook", label = "@text/phonebookLookupActionInputPhoneBookLabel", description = "@text/phonebookLookupActionInputPhoneBookDescription", type = "java.lang.String") @Nullable String phonebook) {
|
||||
return phonebookLookup(phonenumber, phonebook, null);
|
||||
}
|
||||
|
||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
public @ActionOutput(label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||
@ActionInput(name = "phonebook", label = "@text/phonebookLookupActionInputPhoneBookLabel", description = "@text/phonebookLookupActionInputPhoneBookDescription", type = "java.lang.String") @Nullable String phonebook,
|
||||
@ActionInput(name = "matches", label = "@text/phonebookLookupActionInputMatchesLabel", description = "@text/phonebookLookupActionInputMatchesDescription", type = "java.lang.Integer") @Nullable Integer matchCount) {
|
||||
|
Loading…
Reference in New Issue
Block a user