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 org.apache.commons.lang3.Validate;
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.xml.CombinedXmlValidationProfile;
22  
23  import javax.xml.namespace.QName;
24  
25  /**
26   * @author Dmytro Rud
27   */
28  public class Hl7v3ContinuationAwareWsTransactionConfiguration extends Hl7v3WsTransactionConfiguration {
29  
30      private final String mainRequestRootElementName;
31      private final String mainResponseRootElementName;
32  
33  
34      public Hl7v3ContinuationAwareWsTransactionConfiguration(
35              String name,
36              String description,
37              boolean isQuery,
38              AuditStrategy<Hl7v3AuditDataset> clientAuditStrategy,
39              AuditStrategy<Hl7v3AuditDataset> serverAuditStrategy,
40              QName serviceName,
41              Class<?> sei,
42              QName bindingName,
43              boolean mtom,
44              String wsdlLocation,
45              String nakRootElementName,
46              String controlActProcessCode,
47              boolean auditRequestPayload,
48              boolean supportAsynchrony,
49              CombinedXmlValidationProfile requestValidationProfile,
50              CombinedXmlValidationProfile responseValidationProfile,
51              String mainRequestRootElementName,
52              String mainResponseRootElementName
53      )
54      {
55          super(name, description, isQuery, clientAuditStrategy, serverAuditStrategy,
56                  serviceName, sei, bindingName, mtom, wsdlLocation,
57                  nakRootElementName, controlActProcessCode,
58                  auditRequestPayload, supportAsynchrony,
59                  requestValidationProfile, responseValidationProfile);
60  
61          Validate.notEmpty(mainRequestRootElementName);
62          Validate.notEmpty(mainResponseRootElementName);
63          this.mainRequestRootElementName = mainRequestRootElementName;
64          this.mainResponseRootElementName = mainResponseRootElementName;
65      }
66  
67  
68      /**
69       * @return root XML element name for request messages
70       * which correspond to the "main" operation of the transaction,
71       * e.g. "PRPA_IN201305UV02" for PDQv3.
72       */
73      public String getMainRequestRootElementName() {
74          return mainRequestRootElementName;
75      }
76  
77      /**
78       * @return root XML element name for response messages
79       * which correspond to the "main" operation of the transaction,
80       * e.g. "PRPA_IN201306UV02" for PDQv3.
81       */
82      public String getMainResponseRootElementName() {
83          return mainResponseRootElementName;
84      }
85  
86  }