View Javadoc
1   /*
2    * Copyright 2011 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.platform.camel.ihe.ws.mbean;
17  
18  import org.apache.camel.Endpoint;
19  import org.openehealth.ipf.commons.ihe.ws.WsInteractionId;
20  import org.openehealth.ipf.commons.ihe.ws.WsTransactionConfiguration;
21  import org.openehealth.ipf.commons.ihe.ws.cxf.audit.WsAuditDataset;
22  import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsComponent;
23  
24  import javax.xml.namespace.QName;
25  import java.util.Map;
26  
27  public class SomeItiComponent extends AbstractWsComponent<WsAuditDataset, WsTransactionConfiguration<WsAuditDataset>, WsInteractionId<WsTransactionConfiguration<WsAuditDataset>>> {
28  
29      private static final String NS_URI = "urn:iti:some:mai:2011";
30  
31      public static final WsTransactionConfiguration<WsAuditDataset> WS_CONFIG = new WsTransactionConfiguration<>(
32              "foo",
33              "Some Component",
34              false,
35              null,
36              null,
37              new QName(NS_URI, "SomeConsumer_Service", "iti"),
38              String.class,
39              new QName(NS_URI, "SomeConsumer_Binding_Soap12", "iti"),
40              false,
41              "wsdl/some/some.wsdl",
42              true,
43              false,
44              false,
45              false);
46  
47      public SomeItiComponent() {
48          super(null);
49      }
50  
51      @Override
52      public WsTransactionConfiguration<WsAuditDataset> getWsTransactionConfiguration() {
53          return WS_CONFIG;
54      }
55  
56      @SuppressWarnings("unchecked")
57      protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) {
58          return new SomeItiEndpoint(uri, remaining, this,
59                  getAuditContext(parameters),
60                  getCustomInterceptors(parameters),
61                  getFeatures(parameters),
62                  getSchemaLocations(parameters),
63                  getProperties(parameters));
64      }
65  
66  }