@@ -53,17 +53,18 @@ public class SendMailActions implements ThingActions {
53
53
54
54
@ RuleAction (label = "@text/sendMessageActionLabel" , description = "@text/sendMessageActionDescription" )
55
55
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendMail (
56
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
57
- @ ActionInput (name = "subject" ) @ Nullable String subject ,
58
- @ ActionInput (name = "text" ) @ Nullable String text ) {
56
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
57
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
58
+ @ ActionInput (name = "text" , label = "@text/actionInputTextLabel" , description = "@text/actionInputTextDescription" ) @ Nullable String text ) {
59
59
return sendMailWithAttachments (recipient , subject , text , List .of ());
60
60
}
61
61
62
62
@ RuleAction (label = "@text/sendAttachmentMessageActionLabel" , description = "@text/sendAttachmentMessageActionDescription" )
63
63
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendMailWithAttachment (
64
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
65
- @ ActionInput (name = "subject" ) @ Nullable String subject , @ ActionInput (name = "text" ) @ Nullable String text ,
66
- @ ActionInput (name = "url" ) @ Nullable String url ) {
64
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
65
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
66
+ @ ActionInput (name = "text" , label = "@text/actionInputTextLabel" , description = "@text/actionInputTextDescription" ) @ Nullable String text ,
67
+ @ ActionInput (name = "url" , label = "@text/actionInputUrlLabel" , description = "@text/actionInputUrlDescription" ) @ Nullable String url ) {
67
68
List <String > urlList = new ArrayList <>();
68
69
if (url != null ) {
69
70
urlList .add (url );
@@ -73,9 +74,10 @@ public class SendMailActions implements ThingActions {
73
74
74
75
@ RuleAction (label = "@text/sendAttachmentsMessageActionLabel" , description = "@text/sendAttachmentsMessageActionDescription" )
75
76
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendMailWithAttachments (
76
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
77
- @ ActionInput (name = "subject" ) @ Nullable String subject , @ ActionInput (name = "text" ) @ Nullable String text ,
78
- @ ActionInput (name = "urlList" , type = "List<String>" ) @ Nullable List <String > urlList ) {
77
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
78
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
79
+ @ ActionInput (name = "text" , label = "@text/actionInputTextLabel" , description = "@text/actionInputTextDescription" ) @ Nullable String text ,
80
+ @ ActionInput (name = "urlList" , type = "List<String>" , label = "@text/actionInputUrlListLabel" , description = "@text/actionInputUrlListDescription" ) @ Nullable List <String > urlList ) {
79
81
if (recipient == null ) {
80
82
logger .warn ("Cannot send mail as recipient is missing." );
81
83
return false ;
@@ -142,18 +144,18 @@ public static boolean sendMailWithAttachments(ThingActions actions, @Nullable St
142
144
143
145
@ RuleAction (label = "@text/sendHTMLMessageActionLabel" , description = "@text/sendHTMLMessageActionDescription" )
144
146
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendHtmlMail (
145
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
146
- @ ActionInput (name = "subject" ) @ Nullable String subject ,
147
- @ ActionInput (name = "htmlContent" ) @ Nullable String htmlContent ) {
147
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
148
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
149
+ @ ActionInput (name = "htmlContent" , label = "@text/actionInputHtmlContentLabel" , description = "@text/actionInputHtmlContentDescription" ) @ Nullable String htmlContent ) {
148
150
return sendHtmlMailWithAttachments (recipient , subject , htmlContent , List .of ());
149
151
}
150
152
151
153
@ RuleAction (label = "@text/sendHTMLAttachmentMessageActionLabel" , description = "@text/sendHTMLAttachmentMessageActionDescription" )
152
154
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendHtmlMailWithAttachment (
153
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
154
- @ ActionInput (name = "subject" ) @ Nullable String subject ,
155
- @ ActionInput (name = "htmlContent" ) @ Nullable String htmlContent ,
156
- @ ActionInput (name = "url" ) @ Nullable String url ) {
155
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
156
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
157
+ @ ActionInput (name = "htmlContent" , label = "@text/actionInputHtmlContentLabel" , description = "@text/actionInputHtmlContentDescription" ) @ Nullable String htmlContent ,
158
+ @ ActionInput (name = "url" , label = "@text/actionInputUrlLabel" , description = "@text/actionInputUrlDescription" ) @ Nullable String url ) {
157
159
List <String > urlList = new ArrayList <>();
158
160
if (url != null ) {
159
161
urlList .add (url );
@@ -163,10 +165,10 @@ public static boolean sendMailWithAttachments(ThingActions actions, @Nullable St
163
165
164
166
@ RuleAction (label = "@text/sendHTMLAttachmentsMessageActionLabel" , description = "@text/sendHTMLAttachmentsMessageActionDescription" )
165
167
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean sendHtmlMailWithAttachments (
166
- @ ActionInput (name = "recipient" ) @ Nullable String recipient ,
167
- @ ActionInput (name = "subject" ) @ Nullable String subject ,
168
- @ ActionInput (name = "htmlContent" ) @ Nullable String htmlContent ,
169
- @ ActionInput (name = "urlList" , type = "List<String>" ) @ Nullable List <String > urlList ) {
168
+ @ ActionInput (name = "recipient" , label = "@text/actionInputRecipientLabel" , description = "@text/actionInputRecipientDescription" ) @ Nullable String recipient ,
169
+ @ ActionInput (name = "subject" , label = "@text/actionInputSubjectLabel" , description = "@text/actionInputSubjectDescription" ) @ Nullable String subject ,
170
+ @ ActionInput (name = "htmlContent" , label = "@text/actionInputHtmlContentLabel" , description = "@text/actionInputHtmlContentDescription" ) @ Nullable String htmlContent ,
171
+ @ ActionInput (name = "urlList" , type = "List<String>" , label = "@text/actionInputUrlListLabel" , description = "@text/actionInputUrlListDescription" ) @ Nullable List <String > urlList ) {
170
172
if (recipient == null ) {
171
173
logger .warn ("Cannot send mail as recipient is missing." );
172
174
return false ;
@@ -245,7 +247,8 @@ public void setThingHandler(@Nullable ThingHandler handler) {
245
247
246
248
@ RuleAction (label = "@text/addHeaderActionLabel" , description = "@text/addHeaderActionDescription" )
247
249
public @ ActionOutput (label = "Success" , type = "java.lang.Boolean" ) Boolean addHeader (
248
- @ ActionInput (name = "name" ) @ Nullable String name , @ ActionInput (name = "value" ) @ Nullable String value ) {
250
+ @ ActionInput (name = "name" , label = "@text/actionInputHeaderNameLabel" ) @ Nullable String name ,
251
+ @ ActionInput (name = "value" , label = "@text/actionInputHeaderValueLabel" ) @ Nullable String value ) {
249
252
if (name != null && !name .isEmpty ()) {
250
253
if (value != null && !value .isEmpty ()) {
251
254
headers .put (name , value );
0 commit comments