1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30;
17
18 import org.apache.commons.lang3.Validate;
19 import org.openehealth.ipf.commons.ihe.xds.core.ebxml.EbXMLRegistryError;
20 import org.openehealth.ipf.commons.ihe.xds.core.responses.Severity;
21 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.rs.RegistryError;
22
23
24
25
26 public class EbXMLRegistryError30 implements EbXMLRegistryError {
27 private final RegistryError error;
28
29 public EbXMLRegistryError30(RegistryError error) {
30 Validate.notNull(error, "registry error object cannot be null");
31 this.error = error;
32 }
33
34 @Override
35 public String getCodeContext() {
36 return error.getCodeContext();
37 }
38
39 @Override
40 public void setCodeContext(String codeContext) {
41 error.setCodeContext(codeContext);
42 }
43
44 @Override
45 public String getErrorCode() {
46 return error.getErrorCode();
47 }
48
49 @Override
50 public void setErrorCode(String errorCode) {
51 error.setErrorCode(errorCode);
52 }
53
54 @Override
55 public Severity getSeverity() {
56 return Severity.valueOfOpcode30(error.getSeverity());
57 }
58
59 @Override
60 public void setSeverity(Severity severity) {
61 error.setSeverity(severity.getOpcode30());
62 }
63
64 @Override
65 public String getLocation() {
66 return error.getLocation();
67 }
68
69 @Override
70 public void setLocation(String location) {
71 error.setLocation(location);
72 }
73
74 public RegistryError getInternal() {
75 return error;
76 }
77 }