KickJava   Java API By Example, From Geeks To Geeks.

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


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 /** Service information for wsimport utility
23  */

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