1 package ca.uhn.hl7v2.conf.spec;
2
3 import ca.uhn.hl7v2.conf.spec.usecase.UseCase;
4 import ca.uhn.hl7v2.conf.spec.message.StaticDef;
5 import ca.uhn.hl7v2.conf.ProfileException;
6
7
8
9
10
11 public class RuntimeProfile {
12
13 private Conformance conformance;
14
15 private String conformanceType;
16 private Encoding[] encodings;
17
18 private String HL7OID;
19
20 private String HL7Version;
21
22 private String impNote;
23
24
25 private StaticDef message;
26
27
28 private String orgName;
29
30
31 private final java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);
32
33
34 private String role;
35
36
37 private String specName;
38
39
40 private String specVersion;
41
42
43 private String status;
44
45 private UseCase useCase;
46
47
48 private final java.beans.VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this);
49 private String name;
50
51
52 public RuntimeProfile() {
53 }
54
55
56
57
58 public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
59 propertyChangeSupport.addPropertyChangeListener(l);
60 }
61
62
63
64
65 public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
66 vetoableChangeSupport.addVetoableChangeListener(l);
67 }
68
69
70
71
72 public Conformance getConformance() {
73 return this.conformance;
74 }
75
76
77
78
79 public String getConformanceType() {
80 return this.conformanceType;
81 }
82
83
84
85
86
87 public Encoding getEncodings(int index) {
88 return this.encodings[index];
89 }
90
91
92
93
94 public String getHL7OID() {
95 return this.HL7OID;
96 }
97
98
99
100
101 public String getHL7Version() {
102 return this.HL7Version;
103 }
104
105
106
107
108 public String getImpNote() {
109 return this.impNote;
110 }
111
112
113
114
115 public StaticDef getMessage() {
116 return this.message;
117 }
118
119
120
121
122 public String getOrgName() {
123 return this.orgName;
124 }
125
126
127
128
129 public String getRole() {
130 return this.role;
131 }
132
133
134
135
136 public String getSpecName() {
137 return this.specName;
138 }
139
140
141
142
143 public String getSpecVersion() {
144 return this.specVersion;
145 }
146
147
148
149
150 public String getStatus() {
151 return this.status;
152 }
153
154
155
156
157 public UseCase getUseCase() {
158 return this.useCase;
159 }
160
161
162
163
164 public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
165 propertyChangeSupport.removePropertyChangeListener(l);
166 }
167
168
169
170
171 public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
172 vetoableChangeSupport.removeVetoableChangeListener(l);
173 }
174
175
176
177
178
179
180 public void setConformance(Conformance conformance) throws ProfileException {
181 Conformance oldConformance = this.conformance;
182 try {
183 vetoableChangeSupport.fireVetoableChange("conformance", oldConformance, conformance);
184 } catch (Exception e) {
185 throw new ProfileException(null, e);
186 }
187 this.conformance = conformance;
188 propertyChangeSupport.firePropertyChange("conformance", oldConformance, conformance);
189 }
190
191
192
193
194
195
196 public void setConformanceType(String conformanceType) throws ProfileException {
197 String oldConformanceType = this.conformanceType;
198 try {
199 vetoableChangeSupport.fireVetoableChange("conformanceType", oldConformanceType, conformanceType);
200 } catch (Exception e) {
201 throw new ProfileException(null, e);
202 }
203 this.conformanceType = conformanceType;
204 propertyChangeSupport.firePropertyChange("conformanceType", oldConformanceType, conformanceType);
205 }
206
207
208
209
210
211
212
213 public void setEncodings(int index, Encoding encodings) throws ProfileException {
214 Encoding oldEncodings = this.encodings[index];
215 this.encodings[index] = encodings;
216 try {
217 vetoableChangeSupport.fireVetoableChange("encodings", null, null );
218 }
219 catch(java.beans.PropertyVetoException vetoException ) {
220 this.encodings[index] = oldEncodings;
221 throw new ProfileException(null, vetoException);
222 }
223 propertyChangeSupport.firePropertyChange("encodings", null, null );
224 }
225
226
227
228
229
230
231 public void setHL7OID(String HL7OID) throws ProfileException {
232 String oldHL7OID = this.HL7OID;
233 try {
234 vetoableChangeSupport.fireVetoableChange("HL7OID", oldHL7OID, HL7OID);
235 } catch (Exception e) {
236 throw new ProfileException(null, e);
237 }
238 this.HL7OID = HL7OID;
239 propertyChangeSupport.firePropertyChange("HL7OID", oldHL7OID, HL7OID);
240 }
241
242
243
244
245
246
247 public void setHL7Version(String HL7Version) throws ProfileException {
248 String oldHL7Version = this.HL7Version;
249 try {
250 vetoableChangeSupport.fireVetoableChange("HL7Version", oldHL7Version, HL7Version);
251 } catch (Exception e) {
252 throw new ProfileException(null, e);
253 }
254 this.HL7Version = HL7Version;
255 propertyChangeSupport.firePropertyChange("HL7Version", oldHL7Version, HL7Version);
256 }
257
258
259
260
261
262
263 public void setImpNote(String impNote) throws ProfileException {
264 String oldImpNote = this.impNote;
265 try {
266 vetoableChangeSupport.fireVetoableChange("impNote", oldImpNote, impNote);
267 } catch (Exception e) {
268 throw new ProfileException(null, e);
269 }
270 this.impNote = impNote;
271 propertyChangeSupport.firePropertyChange("impNote", oldImpNote, impNote);
272 }
273
274
275
276
277
278
279 public void setMessage(StaticDef message) throws ProfileException {
280 StaticDef oldMessage = this.message;
281 try {
282 vetoableChangeSupport.fireVetoableChange("message", oldMessage, message);
283 } catch (Exception e) {
284 throw new ProfileException(null, e);
285 }
286 this.message = message;
287 propertyChangeSupport.firePropertyChange("message", oldMessage, message);
288 }
289
290 public void setName(String theName) throws ProfileException {
291 String oldOrgName = this.name;
292 try {
293 vetoableChangeSupport.fireVetoableChange("name", oldOrgName, theName);
294 } catch (Exception e) {
295 throw new ProfileException(null, e);
296 }
297 this.name = theName;
298 propertyChangeSupport.firePropertyChange("name", oldOrgName, theName);
299 }
300
301
302
303
304 public String getName() {
305 return name;
306 }
307
308
309
310
311
312
313 public void setOrgName(String orgName) throws ProfileException {
314 String oldOrgName = this.orgName;
315 try {
316 vetoableChangeSupport.fireVetoableChange("orgName", oldOrgName, orgName);
317 } catch (Exception e) {
318 throw new ProfileException(null, e);
319 }
320 this.orgName = orgName;
321 propertyChangeSupport.firePropertyChange("orgName", oldOrgName, orgName);
322 }
323
324
325
326
327
328
329 public void setRole(String role) throws ProfileException {
330 String oldRole = this.role;
331 try {
332 vetoableChangeSupport.fireVetoableChange("role", oldRole, role);
333 } catch (Exception e) {
334 throw new ProfileException(null, e);
335 }
336 this.role = role;
337 propertyChangeSupport.firePropertyChange("role", oldRole, role);
338 }
339
340
341
342
343
344
345 public void setSpecName(String specName) throws ProfileException {
346 String oldSpecName = this.specName;
347 try {
348 vetoableChangeSupport.fireVetoableChange("specName", oldSpecName, specName);
349 } catch (Exception e) {
350 throw new ProfileException(null, e);
351 }
352 this.specName = specName;
353 propertyChangeSupport.firePropertyChange("specName", oldSpecName, specName);
354 }
355
356
357
358
359
360
361 public void setSpecVersion(String specVersion) throws ProfileException {
362 String oldSpecVersion = this.specVersion;
363 try {
364 vetoableChangeSupport.fireVetoableChange("specVersion", oldSpecVersion, specVersion);
365 } catch (Exception e) {
366 throw new ProfileException(null, e);
367 }
368 this.specVersion = specVersion;
369 propertyChangeSupport.firePropertyChange("specVersion", oldSpecVersion, specVersion);
370 }
371
372
373
374
375
376
377 public void setStatus(String status) throws ProfileException {
378 String oldStatus = this.status;
379 try {
380 vetoableChangeSupport.fireVetoableChange("status", oldStatus, status);
381 } catch (Exception e) {
382 throw new ProfileException(null, e);
383 }
384 this.status = status;
385 propertyChangeSupport.firePropertyChange("status", oldStatus, status);
386 }
387
388
389
390
391
392
393 public void setUseCase(UseCase useCase) throws ProfileException {
394 UseCase oldUseCase = this.useCase;
395 try {
396 vetoableChangeSupport.fireVetoableChange("useCase", oldUseCase, useCase);
397 } catch (Exception e) {
398 throw new ProfileException(null, e);
399 }
400 this.useCase = useCase;
401 propertyChangeSupport.firePropertyChange("useCase", oldUseCase, useCase);
402 }
403
404 }