1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.waarp.openr66.protocol.localhandler.packet.json;
21
22 import org.waarp.openr66.protocol.localhandler.packet.LocalPacketFactory;
23
24 import static org.waarp.common.database.DbConstant.*;
25
26
27
28
29 public class ConfigImportJsonPacket extends JsonPacket {
30
31 protected boolean purgehost;
32 protected boolean purgerule;
33 protected boolean purgebusiness;
34 protected boolean purgealias;
35 protected boolean purgeroles;
36 protected String host;
37 protected String rule;
38 protected String business;
39 protected String alias;
40 protected String roles;
41 protected long hostid = ILLEGALVALUE;
42 protected long ruleid = ILLEGALVALUE;
43 protected long businessid = ILLEGALVALUE;
44 protected long aliasid = ILLEGALVALUE;
45 protected long rolesid = ILLEGALVALUE;
46
47
48
49
50 public final boolean isPurgehost() {
51 return purgehost;
52 }
53
54
55
56
57 public final void setPurgehost(final boolean purgehost) {
58 this.purgehost = purgehost;
59 }
60
61
62
63
64 public final boolean isPurgerule() {
65 return purgerule;
66 }
67
68
69
70
71 public final void setPurgerule(final boolean purgerule) {
72 this.purgerule = purgerule;
73 }
74
75
76
77
78 public final boolean isPurgebusiness() {
79 return purgebusiness;
80 }
81
82
83
84
85 public final void setPurgebusiness(final boolean purgebusiness) {
86 this.purgebusiness = purgebusiness;
87 }
88
89
90
91
92 public final boolean isPurgealias() {
93 return purgealias;
94 }
95
96
97
98
99 public final void setPurgealias(final boolean purgealias) {
100 this.purgealias = purgealias;
101 }
102
103
104
105
106 public final boolean isPurgeroles() {
107 return purgeroles;
108 }
109
110
111
112
113 public final void setPurgeroles(final boolean purgeroles) {
114 this.purgeroles = purgeroles;
115 }
116
117
118
119
120 public final String getHost() {
121 return host;
122 }
123
124
125
126
127 public final void setHost(final String host) {
128 this.host = host;
129 }
130
131
132
133
134 public String getRule() {
135 return rule;
136 }
137
138
139
140
141 public final void setRule(final String rule) {
142 this.rule = rule;
143 }
144
145
146
147
148 public final String getBusiness() {
149 return business;
150 }
151
152
153
154
155 public final void setBusiness(final String business) {
156 this.business = business;
157 }
158
159
160
161
162 public final String getAlias() {
163 return alias;
164 }
165
166
167
168
169 public final void setAlias(final String alias) {
170 this.alias = alias;
171 }
172
173
174
175
176 public final String getRoles() {
177 return roles;
178 }
179
180
181
182
183 public final void setRoles(final String roles) {
184 this.roles = roles;
185 }
186
187
188
189
190 public final long getHostid() {
191 return hostid;
192 }
193
194
195
196
197 public final void setHostid(final long hostid) {
198 this.hostid = hostid;
199 }
200
201
202
203
204 public final long getRuleid() {
205 return ruleid;
206 }
207
208
209
210
211 public final void setRuleid(final long ruleid) {
212 this.ruleid = ruleid;
213 }
214
215
216
217
218 public final long getBusinessid() {
219 return businessid;
220 }
221
222
223
224
225 public final void setBusinessid(final long businessid) {
226 this.businessid = businessid;
227 }
228
229
230
231
232 public final long getAliasid() {
233 return aliasid;
234 }
235
236
237
238
239 public final void setAliasid(final long aliasid) {
240 this.aliasid = aliasid;
241 }
242
243
244
245
246 public final long getRolesid() {
247 return rolesid;
248 }
249
250
251
252
253 public final void setRolesid(final long rolesid) {
254 this.rolesid = rolesid;
255 }
256
257 @Override
258 public final void fromJson(final JsonPacket other) {
259 super.fromJson(other);
260 if (other instanceof ConfigImportJsonPacket) {
261 final ConfigImportJsonPacket other2 = (ConfigImportJsonPacket) other;
262 purgehost = other2.purgehost;
263 purgerule = other2.purgerule;
264 purgebusiness = other2.purgebusiness;
265 purgealias = other2.purgealias;
266 purgeroles = other2.purgeroles;
267 host = other2.host;
268 rule = other2.rule;
269 business = other2.business;
270 alias = other2.alias;
271 roles = other2.roles;
272 hostid = other2.hostid;
273 ruleid = other2.ruleid;
274 businessid = other2.businessid;
275 aliasid = other2.aliasid;
276 rolesid = other2.rolesid;
277 }
278 }
279
280 @Override
281 public void setRequestUserPacket() {
282 setRequestUserPacket(LocalPacketFactory.CONFIMPORTPACKET);
283 }
284 }