diff --git a/bundles/org.openhab.binding.mail/src/main/java/org/openhab/binding/mail/internal/action/SendMailActions.java b/bundles/org.openhab.binding.mail/src/main/java/org/openhab/binding/mail/internal/action/SendMailActions.java index bbdf0b0e885..8f336efb77b 100644 --- a/bundles/org.openhab.binding.mail/src/main/java/org/openhab/binding/mail/internal/action/SendMailActions.java +++ b/bundles/org.openhab.binding.mail/src/main/java/org/openhab/binding/mail/internal/action/SendMailActions.java @@ -52,7 +52,7 @@ public class SendMailActions implements ThingActions { private Map headers = new HashMap<>(); @RuleAction(label = "@text/sendMessageActionLabel", description = "@text/sendMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendMail( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendMail( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "text") @Nullable String text) { @@ -60,7 +60,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/sendAttachmentMessageActionLabel", description = "@text/sendAttachmentMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendMailWithAttachment( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendMailWithAttachment( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "text") @Nullable String text, @ActionInput(name = "url") @Nullable String url) { @@ -72,7 +72,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/sendAttachmentsMessageActionLabel", description = "@text/sendAttachmentsMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendMailWithAttachments( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendMailWithAttachments( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "text") @Nullable String text, @ActionInput(name = "urlList", type = "List") @Nullable List urlList) { @@ -141,7 +141,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/sendHTMLMessageActionLabel", description = "@text/sendHTMLMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendHtmlMail( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendHtmlMail( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "htmlContent") @Nullable String htmlContent) { @@ -149,7 +149,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/sendHTMLAttachmentMessageActionLabel", description = "@text/sendHTMLAttachmentMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendHtmlMailWithAttachment( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendHtmlMailWithAttachment( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "htmlContent") @Nullable String htmlContent, @@ -162,7 +162,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/sendHTMLAttachmentsMessageActionLabel", description = "@text/sendHTMLAttachmentsMessageActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendHtmlMailWithAttachments( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendHtmlMailWithAttachments( @ActionInput(name = "recipient") @Nullable String recipient, @ActionInput(name = "subject") @Nullable String subject, @ActionInput(name = "htmlContent") @Nullable String htmlContent, @@ -244,7 +244,7 @@ public class SendMailActions implements ThingActions { } @RuleAction(label = "@text/addHeaderActionLabel", description = "@text/addHeaderActionDescription") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean addHeader( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean addHeader( @ActionInput(name = "name") @Nullable String name, @ActionInput(name = "value") @Nullable String value) { if (name != null && !name.isEmpty()) { if (value != null && !value.isEmpty()) { diff --git a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxCubeActions.java b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxCubeActions.java index 7def8b8f76f..49d46d22d23 100644 --- a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxCubeActions.java +++ b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxCubeActions.java @@ -52,7 +52,7 @@ public class MaxCubeActions implements ThingActions { } @RuleAction(label = "backup the Cube data", description = "Creates a backup of the MAX! Cube data.") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean backup() { + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean backup() { MaxCubeBridgeHandler actionsHandler = handler; if (actionsHandler == null) { logger.info("MaxCubeActions: Action service ThingHandler is null!"); @@ -67,7 +67,7 @@ public class MaxCubeActions implements ThingActions { } @RuleAction(label = "reset the Cube configuration", description = "Resets the MAX! Cube room and device information. Devices will need to be included again!") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean resetConfig() { + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean resetConfig() { MaxCubeBridgeHandler actionsHandler = handler; if (actionsHandler == null) { logger.info("MaxCubeActions: Action service ThingHandler is null!"); @@ -82,7 +82,7 @@ public class MaxCubeActions implements ThingActions { } @RuleAction(label = "restart the Cube", description = "Restarts the MAX! Cube.") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean reboot() { + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean reboot() { MaxCubeBridgeHandler actionsHandler = handler; if (actionsHandler == null) { logger.info("MaxCubeActions: Action service ThingHandler is null!"); diff --git a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxDevicesActions.java b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxDevicesActions.java index 0365a830a34..b4a8165fb80 100644 --- a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxDevicesActions.java +++ b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/actions/MaxDevicesActions.java @@ -52,7 +52,7 @@ public class MaxDevicesActions implements ThingActions { } @RuleAction(label = "delete the device from the Cube", description = "Deletes the device from the MAX! Cube. Device will need to be included again!") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean deleteFromCube() { + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean deleteFromCube() { MaxDevicesHandler actionsHandler = handler; if (actionsHandler == null) { logger.info("MaxDevicesActions: Action service ThingHandler is null!"); diff --git a/bundles/org.openhab.binding.modbus.helioseasycontrols/src/main/java/org/openhab/binding/modbus/helioseasycontrols/internal/HeliosEasyControlsActions.java b/bundles/org.openhab.binding.modbus.helioseasycontrols/src/main/java/org/openhab/binding/modbus/helioseasycontrols/internal/HeliosEasyControlsActions.java index f65167f134f..f79cd31d120 100644 --- a/bundles/org.openhab.binding.modbus.helioseasycontrols/src/main/java/org/openhab/binding/modbus/helioseasycontrols/internal/HeliosEasyControlsActions.java +++ b/bundles/org.openhab.binding.modbus.helioseasycontrols/src/main/java/org/openhab/binding/modbus/helioseasycontrols/internal/HeliosEasyControlsActions.java @@ -21,6 +21,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.core.automation.annotation.ActionInput; import org.openhab.core.automation.annotation.ActionOutput; +import org.openhab.core.automation.annotation.ActionOutputs; import org.openhab.core.automation.annotation.RuleAction; import org.openhab.core.thing.binding.ThingActions; import org.openhab.core.thing.binding.ThingActionsScope; @@ -159,7 +160,7 @@ public class HeliosEasyControlsActions implements ThingActions { } @RuleAction(label = "@text/action.getErrorMessages.label", description = "@text/action.getErrorMessages.description") - public @ActionOutput(name = "errorMessages", type = "java.util.List") List getErrorMessages() { + public @ActionOutput(label = "Error Messages", type = "java.util.List") List getErrorMessages() { HeliosEasyControlsHandler handler = this.handler; return (handler != null) ? handler.getErrorMessages() : new ArrayList<>(); } @@ -169,7 +170,7 @@ public class HeliosEasyControlsActions implements ThingActions { } @RuleAction(label = "@text/action.getWarningMessages.label", description = "@text/action.getWarningMessages.description") - public @ActionOutput(name = "warningMessages", type = "java.util.List") List getWarningMessages() { + public @ActionOutput(label = "Warning Messages", type = "java.util.List") List getWarningMessages() { HeliosEasyControlsHandler handler = this.handler; return (handler != null) ? handler.getWarningMessages() : new ArrayList<>(); } @@ -179,7 +180,7 @@ public class HeliosEasyControlsActions implements ThingActions { } @RuleAction(label = "@text/action.getInfoMessages.label", description = "@text/action.getInfoMessages.description") - public @ActionOutput(name = "infoMessages", type = "java.util.List") List getInfoMessages() { + public @ActionOutput(label = "Info Messages", type = "java.util.List") List getInfoMessages() { HeliosEasyControlsHandler handler = this.handler; return (handler != null) ? handler.getInfoMessages() : new ArrayList<>(); } @@ -189,7 +190,7 @@ public class HeliosEasyControlsActions implements ThingActions { } @RuleAction(label = "@text/action.getStatusMessages.label", description = "@text/action.getStatusMessages.description") - public @ActionOutput(name = "statusMessages", type = "java.util.List") List getStatusMessages() { + public @ActionOutput(label = "Status Messages", type = "java.util.List") List getStatusMessages() { HeliosEasyControlsHandler handler = this.handler; return (handler != null) ? handler.getStatusMessages() : new ArrayList<>(); } @@ -199,7 +200,11 @@ public class HeliosEasyControlsActions implements ThingActions { } @RuleAction(label = "@text/action.getMessages.label", description = "@text/action.getMessages.description") - public @ActionOutput(name = "errorMessages", type = "java.util.List") @ActionOutput(name = "warningMessages", type = "java.util.List") @ActionOutput(name = "infoMessages", type = "java.util.List") @ActionOutput(name = "statusMessages", type = "java.util.List") Map getMessages() { + public @ActionOutputs({ + @ActionOutput(name = "errorMessages", label = "Error Messages", type = "java.util.List"), + @ActionOutput(name = "warningMessages", label = "Warning Messages", type = "java.util.List"), + @ActionOutput(name = "infoMessages", label = "Info Messages", type = "java.util.List"), + @ActionOutput(name = "statusMessages", label = "Status Messages", type = "java.util.List") }) Map getMessages() { Map messages = new HashMap<>(); HeliosEasyControlsHandler handler = this.handler; if (handler != null) { diff --git a/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetBridgeActions.java b/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetBridgeActions.java index eb88aae49fc..e841621e16e 100644 --- a/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetBridgeActions.java +++ b/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetBridgeActions.java @@ -23,6 +23,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler; import org.openhab.core.automation.annotation.ActionInput; import org.openhab.core.automation.annotation.ActionOutput; +import org.openhab.core.automation.annotation.ActionOutputs; import org.openhab.core.automation.annotation.RuleAction; import org.openhab.core.thing.binding.ThingActions; import org.openhab.core.thing.binding.ThingActionsScope; @@ -61,7 +62,7 @@ public class OpenWebNetBridgeActions implements ThingActions { } @RuleAction(label = "sendMessage", description = "@text/action.sendMessage.desc") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean sendMessage( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean sendMessage( @ActionInput(name = "message", label = "message", description = "@text/action.sendMessage.input.message.desc") @Nullable String message) { @Nullable Boolean s = (Boolean) sendMessageInternal(message).get("success"); @@ -73,8 +74,9 @@ public class OpenWebNetBridgeActions implements ThingActions { } @RuleAction(label = "sendMessageWithResponse", description = "@text/action.sendMessageWithResponse.desc") - public @ActionOutput(name = "success", type = "java.lang.Boolean") @ActionOutput(name = "responseMessages", type = "java.util.List") Map sendMessageWithResponse( - @ActionInput(name = "message", label = "message", description = "@text/action.sendMessage.input.message.desc") @Nullable String message) { + public @ActionOutputs({ @ActionOutput(name = "success", label = "Success", type = "java.lang.Boolean"), + @ActionOutput(name = "responseMessages", label = "Response Messages", type = "java.util.List") }) Map sendMessageWithResponse( + @ActionInput(name = "message", label = "message", description = "@text/action.sendMessage.input.message.desc") @Nullable String message) { return sendMessageInternal(message); } diff --git a/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetCENActions.java b/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetCENActions.java index ad5e8a56c5a..1282ae71a7f 100644 --- a/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetCENActions.java +++ b/bundles/org.openhab.binding.openwebnet/src/main/java/org/openhab/binding/openwebnet/internal/actions/OpenWebNetCENActions.java @@ -55,7 +55,7 @@ public class OpenWebNetCENActions implements ThingActions { } @RuleAction(label = "virtualPress", description = "@text/action.virtualPress.desc") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean virtualPress( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean virtualPress( @ActionInput(name = "press", label = "press", description = "@text/action.virtualPress.input.press.desc") @Nullable String press, @ActionInput(name = "button", label = "button", description = "@text/action.virtualPress.input.button.desc") int button) { OpenWebNetScenarioHandler handler = scenarioHandler;