KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > wsee > WseeDocletTask


1 /*
2  * Copyright (c) 2001, 2002 The XDoclet team
3  * All rights reserved.
4  */

5 package xdoclet.modules.wsee;
6
7 import java.io.Serializable JavaDoc;
8 import java.util.List JavaDoc;
9
10 import xdoclet.DocletTask;
11
12 /**
13  * This task executes various wsee specific tasks
14  *
15  * @author Christoph G. Jung (christoph.jung@infor.de)
16  * @created 23.12.03
17  * @ant.element name="wseedoclet" display-name="Web Services for Java 2 Enterprise Edition Task"
18  * @version $Revision: 1.1 $
19  */

20
21 public class WseeDocletTask extends DocletTask
22 {
23     /**
24      * constants
25      */

26     public final static String JavaDoc DEFAULT_SPEC = "1.1";
27
28     /**
29      * state
30      */

31     protected String JavaDoc wseeSpec = DEFAULT_SPEC;
32     protected String JavaDoc wsdlFile;
33     protected String JavaDoc jaxrpcMappingFile;
34
35     protected List JavaDoc packageNamespaceMappings = new java.util.ArrayList JavaDoc();
36
37     /**
38      * @return specification version
39      */

40     public String JavaDoc getWseeSpec()
41     {
42         return wseeSpec;
43     }
44
45     /**
46      * @return location of the jaxrpc file
47      */

48     public String JavaDoc getJaxrpcMappingFile()
49     {
50         return jaxrpcMappingFile;
51     }
52
53     /**
54      * @return location of the wsdl file
55      */

56     public String JavaDoc getWsdlFile()
57     {
58         return wsdlFile;
59     }
60
61     /**
62      * @return
63      */

64     public List JavaDoc getPackageNamespaceMappings()
65     {
66         return packageNamespaceMappings;
67     }
68
69     /**
70      * set specification version
71      *
72      * @param ver string specifier
73      */

74     public void setWseeSpec(String JavaDoc ver)
75     {
76         wseeSpec = ver;
77     }
78
79     /**
80      * set location of jaxrpc mapping file
81      *
82      * @param location the file location
83      */

84     public void setJaxrpcMappingFile(String JavaDoc location)
85     {
86         jaxrpcMappingFile = location;
87     }
88
89     /**
90      * set location of the wsdl file
91      *
92      * @param location the file location
93      */

94     public void setWsdlFile(String JavaDoc location)
95     {
96         wsdlFile = location;
97     }
98
99     /**
100      * @param list
101      */

102     public void setPackageNamespaceMappings(List JavaDoc list)
103     {
104         packageNamespaceMappings = list;
105     }
106
107     /**
108      * adds a package-namespace mapping
109      *
110      * @param mapping The feature to be added to the PackageNamespaceMapping attribute
111      */

112     public void addPackageNamespaceMapping(PackageNamespaceMapping mapping)
113     {
114         packageNamespaceMappings.add(mapping);
115     }
116
117     /**
118      * Inner class designed after package substitutions
119      *
120      * @created 23. Februar 2004
121      */

122     public static class PackageNamespaceMapping implements Serializable JavaDoc
123     {
124         private String JavaDoc packages = null;
125         private String JavaDoc namespace = null;
126
127         /**
128          * Gets the Packages attribute of the PackageSubstitution object
129          *
130          * @return The Packages value
131          */

132         public String JavaDoc getPackages()
133         {
134             return packages;
135         }
136
137         /**
138          * Gets the SubstituteWith attribute of the PackageSubstitution object
139          *
140          * @return The SubstituteWith value
141          */

142         public String JavaDoc getNamespace()
143         {
144             return namespace;
145         }
146
147         /**
148          * Sets the Packages attribute of the PackageSubstitution object
149          *
150          * @param packages The new Packages value
151          */

152         public void setPackages(String JavaDoc packages)
153         {
154             this.packages = packages;
155         }
156
157         /**
158          * Sets the SubstituteWith attribute of the PackageSubstitution object
159          *
160          * @param ns
161          */

162         public void setNamespace(String JavaDoc ns)
163         {
164             this.namespace = ns;
165         }
166     }
167
168 }
169
Popular Tags