KickJava   Java API By Example, From Geeks To Geeks.

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


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

5 package xdoclet.modules.wsee;
6
7 import xdoclet.XDocletException;
8 import xdoclet.XmlSubTask;
9 import xdoclet.util.Translator;
10
11 /**
12  * Subtask that generates the jaxrpc-mapping.xml deployment descriptor.
13  *
14  * @author Christoph G. Jung (christoph.jung@infor.de)
15  * @created 23.12.03
16  * @ant.element display-name="jaxrpc-mapping.xml" name="jaxrpc-mapping" parent="xdoclet.modules.wsee.WseeDocletTask"
17  * @version $Revision: 1.1 $
18  */

19
20 public class JaxrpcMappingSubTask extends XmlSubTask
21 {
22     /**
23      * constants
24      */

25     private static String JavaDoc DEFAULT_TEMPLATE_FILE =
26         "resources/jaxrpc-mapping_xml.xdt";
27
28     /**
29      * initialise template
30      */

31     public JaxrpcMappingSubTask()
32     {
33         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
34     }
35
36     /**
37      * runs the subtask
38      *
39      * @exception XDocletException
40      */

41     public void execute() throws XDocletException
42     {
43         validateOptions();
44         startProcess();
45     }
46
47     /*
48      * validates presence of a file location
49      * @see xdoclet.SubTask#validateOptions()
50      */

51     public void validateOptions() throws XDocletException
52     {
53         setDestinationFile(
54             (String JavaDoc) getContext().getConfigParam("JaxrpcMappingFile"));
55         super.validateOptions();
56     }
57
58     /**
59      * notify start of task
60      *
61      * @exception XDocletException
62      */

63     protected void engineStarted() throws XDocletException
64     {
65         System.out.println(
66             Translator.getString(
67             XDocletModulesMessages.class,
68             XDocletModulesMessages.GENERATING_JAXRPC_MAPPING_DESCRIPTOR,
69             new String JavaDoc[]{getDestinationFile()}));
70     }
71
72 }
73
Popular Tags