KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > customization > model > impl > PortCustomizationImpl


1
2 /*
3  * The contents of this file are subject to the terms of the Common Development
4  * and Distribution License (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
8  * or http://www.netbeans.org/cddl.txt.
9  *
10  * When distributing Covered Code, include this CDDL Header Notice in each file
11  * and include the License file at http://www.netbeans.org/cddl.txt.
12  * If applicable, add the following below the CDDL Header, with the fields
13  * enclosed by brackets [] replaced by your own identifying information:
14  * "Portions Copyrighted [year] [name of copyright owner]"
15  *
16  * The Original Software is NetBeans. The Initial Developer of the Original
17  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
18  * Microsystems, Inc. All Rights Reserved.
19  */

20 /*
21  * PortCustomizationImpl.java
22  *
23  * Created on February 4, 2006, 4:31 PM
24  *
25  * To change this template, choose Tools | Template Manager
26  * and open the template in the editor.
27  */

28
29 package org.netbeans.modules.websvc.customization.model.impl;
30
31 import java.util.Collections JavaDoc;
32 import org.netbeans.modules.websvc.customization.model.JavaMethod;
33 import org.netbeans.modules.websvc.customization.model.PortCustomization;
34 import org.netbeans.modules.websvc.customization.model.Provider;
35 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
36 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
37 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
38 import org.w3c.dom.Element JavaDoc;
39
40 /**
41  *
42  * @author Roderico Cruz
43  */

44 public class PortCustomizationImpl extends CustomizationComponentImpl
45         implements PortCustomization{
46     
47     /** Creates a new instance of PortCustomizationImpl */
48     public PortCustomizationImpl(WSDLModel model, Element JavaDoc e) {
49         super(model, e);
50     }
51     
52     public PortCustomizationImpl(WSDLModel model){
53         this(model, createPrefixedElement(JAXWSQName.BINDINGS.getQName(), model));
54     }
55     
56     public void setJavaMethod(JavaMethod method) {
57         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
58         setChild(JavaMethod.class, JAVA_METHOD_PROPERTY, method,
59                 classes);
60     }
61     
62     public JavaMethod getJavaMethod() {
63         return getChild(JavaMethod.class);
64     }
65     
66     public void removeJavaMethod(JavaMethod method) {
67         removeChild(JAVA_METHOD_PROPERTY, method);
68     }
69     
70     public void setProvider(Provider provider) {
71         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
72         setChild(Provider.class, PROVIDER_PROPERTY, provider,
73                 classes);
74     }
75     
76     public void removeProvider(Provider provider) {
77         removeChild(PROVIDER_PROPERTY, provider);
78     }
79     
80     public Provider getProvider() {
81         return getChild(Provider.class);
82     }
83     
84     public void accept(WSDLVisitor visitor) {
85         visitor.visit(this);
86     }
87     
88 }
89
Popular Tags