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.core.model;
018    
019    import java.net.URI;
020    import java.util.ArrayList;
021    import java.util.List;
022    
023    import javax.xml.namespace.QName;
024    
025    import org.apache.servicemix.soap.api.model.Message;
026    import org.apache.servicemix.soap.api.model.Operation;
027    
028    /**
029     * @author <a href="mailto:gnodet [at] gmail.com">Guillaume Nodet</a>
030     */
031    public class AbstractOperation<T extends Message> implements Operation<T> {
032    
033        private QName name;
034        private T input;
035        private T output;
036        private List<T> faults;
037        private URI mep;
038        
039        public AbstractOperation() {
040            faults = new ArrayList<T>();
041        }
042        
043        /**
044         * @return the name
045         */
046        public QName getName() {
047            return name;
048        }
049        /**
050         * @param name the name to set
051         */
052        public void setName(QName name) {
053            this.name = name;
054        }
055        /**
056         * @return the input
057         */
058        public T getInput() {
059            return input;
060        }
061        /**
062         * @param input the input to set
063         */
064        public void setInput(T input) {
065            this.input = input;
066        }
067        /**
068         * @return the output
069         */
070        public T getOutput() {
071            return output;
072        }
073        /**
074         * @param output the output to set
075         */
076        public void setOutput(T output) {
077            this.output = output;
078        }
079        /**
080         * @return the mep
081         */
082        public URI getMep() {
083            return mep;
084        }
085        /**
086         * @param mep the mep to set
087         */
088        public void setMep(URI mep) {
089            this.mep = mep;
090        }
091        /**
092         * @return the faults
093         */
094        public List<T> getFaults() {
095            return faults;
096        }
097        /**
098         * @param fault the fault to add
099         */
100        public void addFault(T fault) {
101            faults.add(fault);
102        }
103    
104        
105    }