01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.servicemix.soap;
18:
19: import java.util.HashMap;
20: import java.util.Map;
21:
22: import org.apache.servicemix.soap.marshalers.SoapMessage;
23:
24: /**
25: *
26: * @author Guillaume Nodet
27: * @version $Revision: 1.5 $
28: * @since 3.0
29: */
30: public class Context {
31:
32: public static final String SOAP_IN = "org.apache.servicemix.SoapIn";
33: public static final String SOAP_OUT = "org.apache.servicemix.SoapOut";
34: public static final String SOAP_FAULT = "org.apache.servicemix.SoapFault";
35: public static final String INTERFACE = "org.apache.servicemix.Interface";
36: public static final String OPERATION = "org.apache.servicemix.Operation";
37: public static final String SERVICE = "org.apache.servicemix.Service";
38: public static final String ENDPOINT = "org.apache.servicemix.Endpoint";
39:
40: public static final String AUTHENTICATION_SERVICE = "org.apache.servicemix.AuthenticationService";
41: public static final String KEYSTORE_MANAGER = "org.apache.servicemix.KeystoreManager";
42:
43: private Map properties;
44:
45: public Context() {
46: this .properties = new HashMap();
47: }
48:
49: public SoapMessage getInMessage() {
50: return (SoapMessage) getProperty(SOAP_IN);
51: }
52:
53: public SoapMessage getOutMessage() {
54: return (SoapMessage) getProperty(SOAP_OUT);
55: }
56:
57: public SoapMessage getFaultMessage() {
58: return (SoapMessage) getProperty(SOAP_FAULT);
59: }
60:
61: public void setInMessage(SoapMessage message) {
62: setProperty(SOAP_IN, message);
63: }
64:
65: public void setOutMessage(SoapMessage message) {
66: setProperty(SOAP_OUT, message);
67: }
68:
69: public void setFaultMessage(SoapMessage message) {
70: setProperty(SOAP_FAULT, message);
71: }
72:
73: public Object getProperty(String name) {
74: return properties.get(name);
75: }
76:
77: public void setProperty(String name, Object value) {
78: properties.put(name, value);
79: }
80:
81: }
|