001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.servicemix.soap;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022 import org.apache.servicemix.soap.marshalers.SoapMessage;
023
024 /**
025 *
026 * @author Guillaume Nodet
027 * @version $Revision: 1.5 $
028 * @since 3.0
029 */
030 public class Context {
031
032 public static final String SOAP_IN = "org.apache.servicemix.SoapIn";
033 public static final String SOAP_OUT = "org.apache.servicemix.SoapOut";
034 public static final String SOAP_FAULT = "org.apache.servicemix.SoapFault";
035 public static final String INTERFACE = "org.apache.servicemix.Interface";
036 public static final String OPERATION = "org.apache.servicemix.Operation";
037 public static final String SERVICE = "org.apache.servicemix.Service";
038 public static final String ENDPOINT = "org.apache.servicemix.Endpoint";
039
040 public static final String AUTHENTICATION_SERVICE = "org.apache.servicemix.AuthenticationService";
041 public static final String KEYSTORE_MANAGER = "org.apache.servicemix.KeystoreManager";
042
043 private Map properties;
044
045 public Context() {
046 this.properties = new HashMap();
047 }
048
049 public SoapMessage getInMessage() {
050 return (SoapMessage) getProperty(SOAP_IN);
051 }
052
053 public SoapMessage getOutMessage() {
054 return (SoapMessage) getProperty(SOAP_OUT);
055 }
056
057 public SoapMessage getFaultMessage() {
058 return (SoapMessage) getProperty(SOAP_FAULT);
059 }
060
061 public void setInMessage(SoapMessage message) {
062 setProperty(SOAP_IN, message);
063 }
064
065 public void setOutMessage(SoapMessage message) {
066 setProperty(SOAP_OUT, message);
067 }
068
069 public void setFaultMessage(SoapMessage message) {
070 setProperty(SOAP_FAULT, message);
071 }
072
073 public Object getProperty(String name) {
074 return properties.get(name);
075 }
076
077 public void setProperty(String name, Object value) {
078 properties.put(name, value);
079 }
080
081 }