KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > apache > axis > ejb > AxisUndeploySubTask


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

5 package xdoclet.modules.apache.axis.ejb;
6
7 import xdoclet.XDocletException;
8 import xdoclet.XmlSubTask;
9 import xdoclet.util.Translator;
10
11 /**
12  * Generates an Axis deployment document for undeploying a web service.
13  *
14  * @author Craig Walls (xdoclet@habuma.com)
15  * @created Mar 23, 2003
16  * @ant.element display-name="Apache AXIS" name="axisundeploy" parent="xdoclet.modules.ejb.EjbDocletTask"
17  * @version $Revision: 1.3 $
18  */

19 public class AxisUndeploySubTask extends XmlSubTask
20 {
21     private final static String JavaDoc AXIS_SCHEMA = "http://xml.apache.org/axis/wsdd";
22
23     private static String JavaDoc DEFAULT_TEMPLATE_FILE = "resources/axis-undeploy_wsdd.xdt";
24
25     private static String JavaDoc GENERATED_FILE_NAME = "undeploy-{0}.xml";
26
27     /**
28      * Describe what the AxisUndeploySubTask constructor does
29      */

30     public AxisUndeploySubTask()
31     {
32         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
33 // System.out.println("Undeploy TEMPLATE URL: " + getClass().getResource(DEFAULT_TEMPLATE_FILE));
34
setDestinationFile(GENERATED_FILE_NAME);
35         setSchema(AXIS_SCHEMA);
36         setHavingClassTag("axis:service");
37         setValidateXML(false);
38     }
39
40     /**
41      * Called to validate configuration parameters.
42      *
43      * @exception XDocletException Description of Exception
44      */

45     public void validateOptions() throws XDocletException
46     {
47         super.validateOptions();
48     }
49
50     /**
51      * Describe what the method does
52      *
53      * @exception XDocletException Describe the exception
54      */

55     protected void engineStarted() throws XDocletException
56     {
57         String JavaDoc service_urn = getCurrentClass().getDoc().getTag("axis:service").getValue();
58         String JavaDoc dest_file_name = getDestinationFile();
59
60         System.out.println(Translator.getString(XDocletModulesApacheAxisEjbMessages.class, XDocletModulesApacheAxisEjbMessages.GENERATING_UD,
61             new String JavaDoc[]{getCurrentClass().getQualifiedName(), service_urn, dest_file_name}));
62     }
63 }
64
Popular Tags