KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > api > jaxws > project > config > Client


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 package org.netbeans.modules.websvc.api.jaxws.project.config;
21
22 /** Client information for wsimport utility
23  */

24 public final class Client {
25     org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Client client;
26     
27     Client(org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Client client) {
28         this.client=client;
29     }
30     
31     public void setName(java.lang.String JavaDoc value) {
32         client.setName(value);
33     }
34
35     public java.lang.String JavaDoc getName() {
36         return client.getName();
37     }
38
39     public void setWsdlUrl(String JavaDoc value) {
40         client.setWsdlUrl(value);
41     }
42     
43     public String JavaDoc getWsdlUrl() {
44         return client.getWsdlUrl();
45     }
46     
47     public void setLocalWsdlFile(String JavaDoc value) {
48         client.setLocalWsdlFile(value);
49     }
50     
51     public String JavaDoc getLocalWsdlFile() {
52         return client.getLocalWsdlFile();
53     }
54
55     public void setCatalogFile(String JavaDoc value) {
56         client.setCatalogFile(value);
57     }
58
59     public String JavaDoc getCatalogFile() {
60         return client.getCatalogFile();
61     }
62
63     public void setPackageName(String JavaDoc value) {
64         client.setPackageName(value);
65     }
66
67     public String JavaDoc getPackageName() {
68         return client.getPackageName();
69     }
70
71     public Binding newBinding(){
72         return new Binding(client.newBinding());
73     }
74
75     public void setBindings(Binding[] bindings) {
76         org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding[] origBindings =
77                 new org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding[bindings.length];
78         for(int i = 0; i < bindings.length; i++){
79             origBindings[i] = (org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding)bindings[i].getOriginal();
80         }
81         client.setBinding(origBindings);
82     }
83     
84     public Binding getBindingByFileName(String JavaDoc fileName){
85         Binding[] bindings = getBindings();
86         for (int i = 0 ; i < bindings.length; i++){
87             Binding binding = bindings[i];
88             if(binding.getFileName().equals(fileName)){
89                 return binding;
90             }
91         }
92         return null;
93     }
94
95     public Binding[] getBindings() {
96         org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding[] bindings = client.getBinding();
97         Binding[] newBindings = new Binding[bindings.length];
98         for(int i = 0; i < bindings.length; i++){
99             newBindings[i] = new Binding(bindings[i]);
100         }
101         return newBindings;
102     }
103     
104     
105     public void addBinding(Binding binding){
106         client.addBinding((org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding)binding.getOriginal());
107     }
108     
109     public void removeBinding(Binding binding){
110         client.removeBinding((org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.Binding)binding.getOriginal());
111     }
112     
113     public String JavaDoc getHandlerBindingFile(){
114         return client.getHandlerBindingFile();
115     }
116     
117     public void setHandlerBindingFile(String JavaDoc file){
118         client.setHandlerBindingFile(file);
119     }
120     
121     public void setPackageNameForceReplace(boolean value) {
122         if (value) client.setPackageNameForceReplace("true");
123         else client.setPackageNameForceReplace(null);
124     }
125     
126     public boolean isPackageNameForceReplace() {
127         String JavaDoc value = client.getPackageNameForceReplace();
128         return "true".equals(value);
129     }
130 }
131
Popular Tags