1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.easyrulesbot.service.yaml.model;
35
36 import java.util.List;
37
38
39
40
41 public class YamlRule
42 {
43
44 private String _strRule;
45 private String _strDescription;
46 private int _nPriority;
47 private String _strMessage;
48 private List<YamlButton> _listButtons;
49 private String _strImage;
50 private String _strDataKey;
51 private String _strProcessor;
52 private List<YamlCondition> _listConditions;
53 private String _strResponseComment;
54
55
56
57
58
59
60 public String getRule( )
61 {
62 return _strRule;
63 }
64
65
66
67
68
69
70
71 public void setRule( String strRule )
72 {
73 _strRule = strRule;
74 }
75
76
77
78
79
80
81 public String getDescription( )
82 {
83 return _strDescription;
84 }
85
86
87
88
89
90
91
92 public void setDescription( String strDescription )
93 {
94 _strDescription = strDescription;
95 }
96
97
98
99
100
101
102 public int getPriority( )
103 {
104 return _nPriority;
105 }
106
107
108
109
110
111
112
113 public void setPriority( int nPriority )
114 {
115 _nPriority = nPriority;
116 }
117
118
119
120
121
122
123 public String getMessage( )
124 {
125 return _strMessage;
126 }
127
128
129
130
131
132
133
134 public void setMessage( String strMessage )
135 {
136 _strMessage = strMessage;
137 }
138
139
140
141
142
143
144 public List<YamlButton> getButtons( )
145 {
146 return _listButtons;
147 }
148
149
150
151
152
153
154
155 public void setButtons( List<YamlButton> listButtons )
156 {
157 _listButtons = listButtons;
158 }
159
160
161
162
163
164
165 public String getImage( )
166 {
167 return _strImage;
168 }
169
170
171
172
173
174
175
176 public void setImage( String strImage )
177 {
178 _strImage = strImage;
179 }
180
181
182
183
184
185
186 public String getDataKey( )
187 {
188 return _strDataKey;
189 }
190
191
192
193
194
195
196
197 public void setDataKey( String strDataKey )
198 {
199 _strDataKey = strDataKey;
200 }
201
202
203
204
205
206
207 public String getProcessor( )
208 {
209 return _strProcessor;
210 }
211
212
213
214
215
216
217
218 public void setProcessor( String strProcessor )
219 {
220 _strProcessor = strProcessor;
221 }
222
223
224
225
226
227
228 public List<YamlCondition> getConditions( )
229 {
230 return _listConditions;
231 }
232
233
234
235
236
237
238
239 public void setConditions( List<YamlCondition> listConditions )
240 {
241 _listConditions = listConditions;
242 }
243
244
245
246
247
248
249 public String getResponseComment( )
250 {
251 return _strResponseComment;
252 }
253
254
255
256
257
258
259
260 public void setResponseComment( String strResponseComment )
261 {
262 _strResponseComment = strResponseComment;
263 }
264
265
266
267
268 @Override
269 public String toString()
270 {
271 StringBuilder sbOutput = new StringBuilder( "\n RULE");
272 sbOutput.append( "\n name : " ).append( _strRule );
273 sbOutput.append( "\n description : " ).append( _strDescription );
274 sbOutput.append( "\n message : " ).append( _strMessage );
275 sbOutput.append( "\n priority : " ).append( _nPriority );
276 sbOutput.append( "\n data key : " ).append( _strDataKey );
277 sbOutput.append( "\n Conditions : " );
278 if( _listConditions != null )
279 {
280 for( YamlCondition condition : _listConditions )
281 {
282 sbOutput.append( "\n " ).append( condition );
283 }
284 }
285 return sbOutput.toString();
286 }
287
288 }