01: /*
02: * OperationImpl.java
03: *
04: * Created on September 24, 2006, 5:35 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.netbeans.modules.e2e.wsdl;
11:
12: import java.util.ArrayList;
13: import java.util.Collections;
14: import java.util.HashMap;
15: import java.util.List;
16: import java.util.Map;
17: import org.netbeans.modules.e2e.api.wsdl.Fault;
18: import org.netbeans.modules.e2e.api.wsdl.Input;
19: import org.netbeans.modules.e2e.api.wsdl.Operation;
20: import org.netbeans.modules.e2e.api.wsdl.Output;
21: import org.netbeans.modules.e2e.api.wsdl.extensions.ExtensibilityElement;
22:
23: /**
24: *
25: * @author Michal Skvor
26: */
27: public class OperationImpl implements Operation {
28:
29: private String name;
30: private Output output;
31: private Input input;
32: private Map<String, Fault> faults;
33: private String documentation;
34:
35: private List<ExtensibilityElement> extensibilityElements;
36:
37: /** Creates a new instance of OperationImpl */
38: public OperationImpl(String name) {
39: this .name = name;
40: faults = new HashMap();
41: extensibilityElements = new ArrayList();
42: }
43:
44: public void setName(String name) {
45: this .name = name;
46: }
47:
48: public String getName() {
49: return name;
50: }
51:
52: public void setOutput(Output output) {
53: this .output = output;
54: }
55:
56: public Output getOutput() {
57: return output;
58: }
59:
60: public void setInput(Input input) {
61: this .input = input;
62: }
63:
64: public Input getInput() {
65: return input;
66: }
67:
68: public void addFault(Fault fault) {
69: faults.put(fault.getName(), fault);
70: }
71:
72: public Fault getFault(String name) {
73: return faults.get(name);
74: }
75:
76: public List<Fault> getFaults() {
77: return Collections.unmodifiableList(new ArrayList(faults
78: .values()));
79: }
80:
81: public void addExtensibilityElement(
82: ExtensibilityElement extensibilityElement) {
83: extensibilityElements.add(extensibilityElement);
84: }
85:
86: public List<ExtensibilityElement> getExtensibilityElements() {
87: return Collections.unmodifiableList(extensibilityElements);
88: }
89:
90: public void setDocumentation(String documentation) {
91: this .documentation = documentation;
92: }
93:
94: public String getDocumentation() {
95: return documentation;
96: }
97: }
|