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 YamlBot
42 {
43
44 private String _strKey;
45 private String _strName;
46 private String _strDescription;
47 private String _strLanguage;
48 private String _strWelcomeMessage;
49 private String _strAvatarUrl;
50 private List<YamlRule> _listRules;
51 private List<YamlFilter> _listFilters;
52 private boolean _bStandalone;
53
54
55
56
57
58
59 public String getKey( )
60 {
61 return _strKey;
62 }
63
64
65
66
67
68
69
70 public void setKey( String strKey )
71 {
72 _strKey = strKey;
73 }
74
75
76
77
78
79
80 public String getName( )
81 {
82 return _strName;
83 }
84
85
86
87
88
89
90
91 public void setName( String strName )
92 {
93 _strName = strName;
94 }
95
96
97
98
99
100
101 public String getDescription( )
102 {
103 return _strDescription;
104 }
105
106
107
108
109
110
111
112 public void setDescription( String strDescription )
113 {
114 _strDescription = strDescription;
115 }
116
117
118
119
120
121
122 public String getLanguage( )
123 {
124 return _strLanguage;
125 }
126
127
128
129
130
131
132
133 public void setLanguage( String strLanguage )
134 {
135 _strLanguage = strLanguage;
136 }
137
138
139
140
141
142
143 public String getWelcomeMessage( )
144 {
145 return _strWelcomeMessage;
146 }
147
148
149
150
151
152
153
154 public void setWelcomeMessage( String strWelcomeMessage )
155 {
156 _strWelcomeMessage = strWelcomeMessage;
157 }
158
159
160
161
162
163
164 public String getAvatarUrl( )
165 {
166 return _strAvatarUrl;
167 }
168
169
170
171
172
173
174
175 public void setAvatarUrl( String strAvatarUrl )
176 {
177 _strAvatarUrl = strAvatarUrl;
178 }
179
180
181
182
183
184
185 public boolean getStandalone( )
186 {
187 return _bStandalone;
188 }
189
190
191
192
193
194
195
196 public void setStandalone( boolean bStandalone )
197 {
198 _bStandalone = bStandalone;
199 }
200
201
202
203
204
205
206 public List<YamlRule> getRules( )
207 {
208 return _listRules;
209 }
210
211
212
213
214
215
216
217 public void setRules( List<YamlRule> listRules )
218 {
219 _listRules = listRules;
220 }
221
222
223
224
225
226
227 public List<YamlFilter> getFilters( )
228 {
229 return _listFilters;
230 }
231
232
233
234
235
236
237
238 public void setFilters( List<YamlFilter> listFilters )
239 {
240 _listFilters = listFilters;
241 }
242
243
244
245
246 @Override
247 public String toString()
248 {
249 StringBuilder sbOutput = new StringBuilder( "\nEASYRULE BOT\n");
250 sbOutput.append( "\n key : " ).append( _strKey );
251 sbOutput.append( "\n name : " ).append( _strName );
252 sbOutput.append( "\n language : " ).append( _strLanguage );
253 sbOutput.append( "\n description : " ).append( _strDescription );
254 sbOutput.append( "\n avatar URL : " ).append( _strAvatarUrl );
255 sbOutput.append( "\n welcome message : " ).append( _strWelcomeMessage );
256 sbOutput.append( "\n Rules : " );
257 for( YamlRule rule : _listRules )
258 {
259 sbOutput.append( "\n " ).append( rule );
260 }
261 return sbOutput.toString();
262 }
263
264
265 }