01: /*
02: * BindingImpl.java
03: *
04: * Created on September 24, 2006, 4:59 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.Binding;
18: import org.netbeans.modules.e2e.api.wsdl.BindingOperation;
19: import org.netbeans.modules.e2e.api.wsdl.PortType;
20: import org.netbeans.modules.e2e.api.wsdl.extensions.ExtensibilityElement;
21:
22: /**
23: *
24: * @author Michal Skvor
25: */
26: public class BindingImpl implements Binding {
27:
28: private String name;
29: private PortType portType;
30: private Map<String, BindingOperation> bindingOperations;
31:
32: private List<ExtensibilityElement> extensibilityElements;
33:
34: /** Creates a new instance of BindingImpl */
35: public BindingImpl(String name) {
36: this .name = name;
37: bindingOperations = new HashMap();
38: extensibilityElements = new ArrayList();
39: }
40:
41: public void setName(String name) {
42: this .name = name;
43: }
44:
45: public String getName() {
46: return name;
47: }
48:
49: public void setPortType(PortType portType) {
50: this .portType = portType;
51: }
52:
53: public PortType getPortType() {
54: return portType;
55: }
56:
57: public void addBindingOperation(BindingOperation bindingOperation) {
58: bindingOperations.put(bindingOperation.getName(),
59: bindingOperation);
60: }
61:
62: public BindingOperation getBindingOperation(String name) {
63: return bindingOperations.get(name);
64: }
65:
66: public List<BindingOperation> getBindingOperations() {
67: return Collections.unmodifiableList(new ArrayList(
68: bindingOperations.values()));
69: }
70:
71: public void addExtensibilityElement(
72: ExtensibilityElement extensibilityElement) {
73: extensibilityElements.add(extensibilityElement);
74: }
75:
76: public List<ExtensibilityElement> getExtensibilityElements() {
77: return Collections.unmodifiableList(extensibilityElements);
78: }
79: }
|