KickJava   Java API By Example, From Geeks To Geeks.

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


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

19
20 /*
21  * JavaExceptionImpl.java
22  *
23  * Created on February 7, 2006, 11:41 AM
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.JavaClass;
33 import org.netbeans.modules.websvc.customization.model.JavaException;
34 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
35 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
36 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
37
38 import org.w3c.dom.Element JavaDoc;
39
40 /**
41  *
42  * @author Roderico Cruz
43  */

44 public class JavaExceptionImpl extends CustomizationComponentImpl
45      implements JavaException{
46     
47     /** Creates a new instance of JavaExceptionImpl */
48     public JavaExceptionImpl(WSDLModel model, Element JavaDoc e) {
49         super(model, e);
50     }
51     
52     public JavaExceptionImpl(WSDLModel model){
53         this(model, createPrefixedElement(JAXWSQName.BINDINGS.getQName(), model));
54     }
55
56     public void setPart(String JavaDoc part) {
57         setAttribute(PART_PROPERTY, CustomizationAttribute.PART, part);
58     }
59
60     public void setJavaClass(JavaClass javaClass) {
61         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
62         this.setChild(JavaClass.class, this.JAVA_CLASS_PROPERTY, javaClass, classes);
63  
64     }
65
66     public void removeJavaClass(JavaClass javaClass) {
67         removeChild(JAVA_CLASS_PROPERTY, javaClass);
68     }
69
70     public String JavaDoc getPart() {
71         return getAttribute(CustomizationAttribute.PART);
72     }
73
74     public JavaClass getJavaClass() {
75         return getChild(JavaClass.class);
76     }
77
78     public void accept(WSDLVisitor visitor) {
79         visitor.visit(this);
80     }
81     
82 }
83
Popular Tags