View Javadoc
1   /*
2    * Copyright 2010 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.hl7v3;
17  
18  import lombok.Getter;
19  import org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy;
20  import org.openehealth.ipf.commons.ihe.hl7v3.audit.Hl7v3AuditDataset;
21  import org.openehealth.ipf.commons.ihe.ws.WsTransactionConfiguration;
22  import org.openehealth.ipf.commons.xml.CombinedXmlValidationProfile;
23  
24  import javax.xml.namespace.QName;
25  
26  /**
27   * @author Dmytro Rud
28   */
29  public class Hl7v3WsTransactionConfiguration extends WsTransactionConfiguration<Hl7v3AuditDataset> {
30  
31      @Getter private final String nakRootElementName;
32      @Getter private final String controlActProcessCode;
33      @Getter private final CombinedXmlValidationProfile requestValidationProfile;
34      @Getter private final CombinedXmlValidationProfile responseValidationProfile;
35  
36      /**
37       * Constructs the transaction configuration.
38       *
39       * @param name
40       *          name of the transaction.
41       * @param description
42       *          human-readable description of the transaction.
43       * @param isQuery
44       *          <code>true</code> if this transaction describes a query, <code>false</code> otherwise.
45       * @param clientAuditStrategy
46       *          {@link AuditStrategy} to be used on client side to accomplish ATNA audit.
47       * @param serverAuditStrategy
48       *          {@link AuditStrategy} to be used on server side to accomplish ATNA audit.
49       * @param serviceName
50       *      the qualified name of the service.
51       * @param sei
52       *      service endpoint interface.
53       * @param bindingName
54       *      the qualified name of the binding to use.
55       * @param mtom
56       *      {@code true} if this service requires MTOM.
57       * @param wsdlLocation
58       *      the location of the WSDL of this webservice.
59       * @param nakRootElementName
60       *      root element name of automatically generated NAKs.
61       * @param controlActProcessCode
62       *      when not {@code null}, the {@code &lt;controlActProcess&gt;}
63       *      element with the given code ID will be created in the NAK.
64       * @param auditRequestPayload
65       *      whether request payload is needed for ATNA audit.
66       * @param supportAsynchrony
67       *      whether producers can request asynchronous responses via WSA.
68       */
69      public Hl7v3WsTransactionConfiguration(
70              String name,
71              String description,
72              boolean isQuery,
73              AuditStrategy<Hl7v3AuditDataset> clientAuditStrategy,
74              AuditStrategy<Hl7v3AuditDataset> serverAuditStrategy,
75              QName serviceName,
76              Class<?> sei,
77              QName bindingName,
78              boolean mtom,
79              String wsdlLocation,
80              String nakRootElementName,
81              String controlActProcessCode,
82              boolean auditRequestPayload,
83              boolean supportAsynchrony,
84              CombinedXmlValidationProfile requestValidationProfile,
85              CombinedXmlValidationProfile responseValidationProfile)
86      {
87          super(name, description, isQuery, clientAuditStrategy, serverAuditStrategy,
88                  serviceName, sei, bindingName, mtom, wsdlLocation,
89                  true, false, auditRequestPayload, supportAsynchrony);
90  
91          this.nakRootElementName = nakRootElementName;
92          this.controlActProcessCode = controlActProcessCode;
93          this.requestValidationProfile = requestValidationProfile;
94          this.responseValidationProfile = responseValidationProfile;
95      }
96  
97  }