KickJava   Java API By Example, From Geeks To Geeks.

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


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 deploying a web service.
13  *
14  * @author Craig Walls (xdoclet@habuma.com)
15  * @created Mar 23, 2003
16  * @ant.element display-name="Apache AXIS" name="axisdeploy" parent="xdoclet.modules.ejb.EjbDocletTask"
17  * @version $Revision: 1.3 $
18  * @xdoclet.merge-file file="axis-mappings-{0}.xml" relates-to="deploy-{0}.xml" description="An XML unparsed
19  * entity containing any typeMapping and beanMapping elements."
20  */

21 public class AxisDeploySubTask extends XmlSubTask
22 {
23     private final static String JavaDoc AXIS_SCHEMA = "http://xml.apache.org/axis/wsdd";
24
25     private static String JavaDoc DEFAULT_TEMPLATE_FILE = "resources/axis-deploy_wsdd.xdt";
26
27     private static String JavaDoc GENERATED_FILE_NAME = "deploy-{0}.xml";
28
29     private String JavaDoc contextFactoryName = "";
30
31     private String JavaDoc contextProviderUrl = "";
32
33     /**
34      * Describe what the AxisDeploySubTask constructor does
35      */

36     public AxisDeploySubTask()
37     {
38         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
39 // System.out.println("Deploy TEMPLATE URL: " + getClass().getResource(DEFAULT_TEMPLATE_FILE));
40
setDestinationFile(GENERATED_FILE_NAME);
41         setSchema(AXIS_SCHEMA);
42         setHavingClassTag("axis:service");
43         setValidateXML(false);
44     }
45
46     /**
47      * Gets the contextFactoryName
48      *
49      * @return
50      */

51     public String JavaDoc getContextFactoryName()
52     {
53         return contextFactoryName;
54     }
55
56     /**
57      * Gets the contextProviderUrl
58      *
59      * @return
60      */

61     public String JavaDoc getContextProviderUrl()
62     {
63         return contextProviderUrl;
64     }
65
66     /**
67      * Sets the contextFactoryName.
68      *
69      * @param string The contextFactoryName
70      */

71     public void setContextFactoryName(String JavaDoc string)
72     {
73         contextFactoryName = string;
74     }
75
76     /**
77      * Sets the contextProviderUrl.
78      *
79      * @param string The contextProviderUrl
80      */

81     public void setContextProviderUrl(String JavaDoc string)
82     {
83         contextProviderUrl = string;
84     }
85
86     /**
87      * Called to validate configuration parameters.
88      *
89      * @exception XDocletException Description of Exception
90      */

91     public void validateOptions() throws XDocletException
92     {
93         super.validateOptions();
94     }
95
96     /**
97      * Describe what the method does
98      *
99      * @exception XDocletException Describe the exception
100      */

101     protected void engineStarted() throws XDocletException
102     {
103         String JavaDoc service_urn = getCurrentClass().getDoc().getTag("axis:service").getValue();
104         String JavaDoc dest_file_name = getDestinationFile();
105
106         System.out.println(Translator.getString(XDocletModulesApacheAxisEjbMessages.class, XDocletModulesApacheAxisEjbMessages.GENERATING_DD,
107             new String JavaDoc[]{getCurrentClass().getQualifiedName(), service_urn, dest_file_name}));
108     }
109
110 }
111
Popular Tags