View Javadoc
1   /*
2    * Copyright 2016 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.openehealth.ipf.commons.ihe.xds;
17  
18  import lombok.AllArgsConstructor;
19  import lombok.Getter;
20  import org.openehealth.ipf.commons.ihe.core.InteractionId;
21  import org.openehealth.ipf.commons.ihe.ws.WsTransactionConfiguration;
22  import org.openehealth.ipf.commons.ihe.xds.core.audit.*;
23  import org.openehealth.ipf.commons.ihe.xds.iti18.Iti18AuditStrategy;
24  import org.openehealth.ipf.commons.ihe.xds.iti18.Iti18PortType;
25  import org.openehealth.ipf.commons.ihe.xds.iti41.Iti41ClientAuditStrategy;
26  import org.openehealth.ipf.commons.ihe.xds.iti41.Iti41PortType;
27  import org.openehealth.ipf.commons.ihe.xds.iti41.Iti41ServerAuditStrategy;
28  import org.openehealth.ipf.commons.ihe.xds.iti42.Iti42ClientAuditStrategy;
29  import org.openehealth.ipf.commons.ihe.xds.iti42.Iti42PortType;
30  import org.openehealth.ipf.commons.ihe.xds.iti42.Iti42ServerAuditStrategy;
31  import org.openehealth.ipf.commons.ihe.xds.iti43.Iti43ClientAuditStrategy;
32  import org.openehealth.ipf.commons.ihe.xds.iti43.Iti43PortType;
33  import org.openehealth.ipf.commons.ihe.xds.iti43.Iti43ServerAuditStrategy;
34  import org.openehealth.ipf.commons.ihe.xds.iti51.Iti51AuditStrategy;
35  import org.openehealth.ipf.commons.ihe.xds.iti51.Iti51PortType;
36  import org.openehealth.ipf.commons.ihe.xds.iti57.Iti57ClientAuditStrategy;
37  import org.openehealth.ipf.commons.ihe.xds.iti57.Iti57PortType;
38  import org.openehealth.ipf.commons.ihe.xds.iti57.Iti57ServerAuditStrategy;
39  import org.openehealth.ipf.commons.ihe.xds.iti61.Iti61ClientAuditStrategy;
40  import org.openehealth.ipf.commons.ihe.xds.iti61.Iti61PortType;
41  import org.openehealth.ipf.commons.ihe.xds.iti61.Iti61ServerAuditStrategy;
42  import org.openehealth.ipf.commons.ihe.xds.iti62.Iti62AuditStrategy;
43  import org.openehealth.ipf.commons.ihe.xds.iti62.Iti62PortType;
44  import org.openehealth.ipf.commons.ihe.xds.iti86.Iti86AuditStrategy;
45  import org.openehealth.ipf.commons.ihe.xds.iti86.Iti86PortType;
46  
47  import javax.xml.namespace.QName;
48  import java.util.Arrays;
49  import java.util.List;
50  
51  /**
52   * @author Christian Ohr
53   * @since 3.2
54   */
55  public class XDS implements XdsIntegrationProfile {
56  
57      private static final XDS Instance = new XDS();
58  
59      @AllArgsConstructor
60      public enum Interactions implements XdsInteractionId {
61          ITI_18(ITI_18_WS_CONFIG),
62          ITI_41(ITI_41_WS_CONFIG),
63          ITI_42(ITI_42_WS_CONFIG),
64          ITI_43(ITI_43_WS_CONFIG),
65          ITI_51(ITI_51_WS_CONFIG),
66          ITI_57(ITI_57_WS_CONFIG),
67          ITI_61(ITI_61_WS_CONFIG),
68          ITI_62(ITI_62_WS_CONFIG),
69          ITI_86(ITI_86_WS_CONFIG);
70  
71          @Getter private WsTransactionConfiguration<? extends XdsAuditDataset> wsTransactionConfiguration;
72  
73          @Override
74          public XdsIntegrationProfile getInteractionProfile() {
75              return Instance;
76          }
77      }
78  
79      @Override
80      public boolean isEbXml30Based() {
81          return true;
82      }
83  
84      @Override
85      public boolean requiresHomeCommunityId() {
86          return false;
87      }
88  
89      @Override
90      public List<InteractionId> getInteractionIds() {
91          return Arrays.asList(Interactions.values());
92      }
93  
94      private final static WsTransactionConfiguration<XdsQueryAuditDataset> ITI_18_WS_CONFIG = new WsTransactionConfiguration<>(
95              "xds-iti18",
96              "Registry Stored Query",
97              true,
98              new Iti18AuditStrategy(false),
99              new Iti18AuditStrategy(true),
100             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Service", "ihe"),
101             Iti18PortType.class,
102             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Binding_Soap12", "ihe"),
103             false,
104             "wsdl/iti18.wsdl",
105             true,
106             false,
107             true,
108             false);
109 
110     private final static WsTransactionConfiguration<XdsSubmitAuditDataset> ITI_41_WS_CONFIG = new WsTransactionConfiguration<>(
111             "xds-iti41",
112             "Provide and Register Document Set-b",
113             false,
114             new Iti41ClientAuditStrategy(),
115             new Iti41ServerAuditStrategy(),
116             new QName("urn:ihe:iti:xds-b:2007", "DocumentRepository_Service", "ihe"),
117             Iti41PortType.class,
118             new QName("urn:ihe:iti:xds-b:2007", "DocumentRepository_Binding_Soap12", "ihe"),
119             true,
120             "wsdl/iti41.wsdl",
121             true,
122             false,
123             false,
124             false);
125 
126     private final static WsTransactionConfiguration<XdsSubmitAuditDataset> ITI_42_WS_CONFIG = new WsTransactionConfiguration<>(
127             "xds-iti42",
128             "Register Document Set-b",
129             false,
130             new Iti42ClientAuditStrategy(),
131             new Iti42ServerAuditStrategy(),
132             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Service", "ihe"),
133             Iti42PortType.class,
134             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Binding_Soap12", "ihe"),
135             false,
136             "wsdl/iti42.wsdl",
137             true,
138             false,
139             false,
140             false);
141 
142     private final static WsTransactionConfiguration<XdsNonconstructiveDocumentSetRequestAuditDataset> ITI_43_WS_CONFIG = new WsTransactionConfiguration<>(
143             "xds-iti43",
144             "Retrieve Document Set",
145             false,
146             new Iti43ClientAuditStrategy(),
147             new Iti43ServerAuditStrategy(),
148             new QName("urn:ihe:iti:xds-b:2007", "DocumentRepository_Service", "ihe"),
149             Iti43PortType.class,
150             new QName("urn:ihe:iti:xds-b:2007", "DocumentRepository_Binding_Soap12", "ihe"),
151             true,
152             "wsdl/iti43.wsdl",
153             true,
154             false,
155             false,
156             false);
157 
158     private final static WsTransactionConfiguration<XdsQueryAuditDataset> ITI_51_WS_CONFIG = new WsTransactionConfiguration<>(
159             "xds-iti51",
160             "Multi-Patient Stored Query",
161             true,
162             new Iti51AuditStrategy(false),
163             new Iti51AuditStrategy(true),
164             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Service", "ihe"),
165             Iti51PortType.class,
166             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Binding_Soap12", "ihe"),
167             false,
168             "wsdl/iti51.wsdl",
169             true,
170             false,
171             true,
172             false);
173 
174     private final static WsTransactionConfiguration<XdsSubmitAuditDataset> ITI_57_WS_CONFIG = new WsTransactionConfiguration<>(
175             "xds-iti57",
176             "XDS Metadata Update",
177             false,
178             new Iti57ClientAuditStrategy(),
179             new Iti57ServerAuditStrategy(),
180             new QName("urn:ihe:iti:xds-b:2010", "DocumentRegistry_Service", "ihe"),
181             Iti57PortType.class,
182             new QName("urn:ihe:iti:xds-b:2010", "DocumentRegistry_Binding_Soap12", "ihe"),
183             false,
184             "wsdl/iti57.wsdl",
185             true,
186             false,
187             false,
188             false);
189 
190 
191     private final static WsTransactionConfiguration<XdsSubmitAuditDataset> ITI_61_WS_CONFIG = new WsTransactionConfiguration<>(
192             "xds-iti61",
193             "Register On-Demand Document Entry",
194             false,
195             new Iti61ClientAuditStrategy(),
196             new Iti61ServerAuditStrategy(),
197             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Service", "ihe"),
198             Iti61PortType.class,
199             new QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Binding_Soap12", "ihe"),
200             false,
201             "wsdl/iti61.wsdl",
202             true,
203             false,
204             false,
205             false);
206 
207     private final static WsTransactionConfiguration<XdsRemoveMetadataAuditDataset> ITI_62_WS_CONFIG = new WsTransactionConfiguration<>(
208             "xds-iti62",
209             "Delete Document Set",
210             false,
211             new Iti62AuditStrategy(false),
212             new Iti62AuditStrategy(true),
213             new QName("urn:ihe:iti:xds-b:2010", "DocumentRegistry_Service", "ihe"),
214             Iti62PortType.class,
215             new QName("urn:ihe:iti:xds-b:2010", "DocumentRegistry_Binding_Soap12", "ihe"),
216             false,
217             "wsdl/iti62.wsdl",
218             true,
219             false,
220             false,
221             false);
222 
223     private final static WsTransactionConfiguration<XdsNonconstructiveDocumentSetRequestAuditDataset> ITI_86_WS_CONFIG = new WsTransactionConfiguration<>(
224             "rmd-iti86",
225             "Remove Documents",
226             false,
227             new Iti86AuditStrategy(false),
228             new Iti86AuditStrategy(true),
229             new QName("urn:ihe:iti:rmd:2017", "DocumentRepository_Service", "ihe"),
230             Iti86PortType.class,
231             new QName("urn:ihe:iti:rmd:2017", "DocumentRepository_Binding_Soap12", "ihe"),
232             false,
233             "wsdl/iti86.wsdl",
234             true,
235             false,
236             false,
237             false);
238 
239 }