KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > jboss > net > JBossNetSubTask


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 // $Id: JBossNetSubTask.java,v 1.4 2003/10/16 14:45:31 cgjung Exp $
9

10 package xdoclet.modules.jboss.net;
11
12 import xdoclet.XmlSubTask;
13
14 /**
15  * JBossNetSubTask is an xml-based ant task that comes with a few
16  * useful tags to support the generation of a suitable web-service.xml
17  * from EJB sources and the JBossNet template.
18  * @ant.element display-name="JBoss.Net" name="jbossnet" parent="xdoclet.modules.ejb.EjbDocletTask"
19  * @author Frederick M. Brier
20  * @author jung
21  * @author Jason Essington
22  * @since May 28, 2002
23  * @version $Revision: 1.4 $
24  */

25
26 public abstract class JBossNetSubTask extends XmlSubTask {
27    public final static String SUBTASK_NAME= "jbossnet";
28
29    private final static String SOAP_SCHEMA= "http://xml.apache.org/axis/wsdd/";
30    private final static String JBOSSNET_DTD_SYSTEMID_31=
31       "http://www.jboss.org/j2ee/dtd/jbossnet_3_1.dtd";
32    private static String GENERATED_FILE_NAME= "web-service.xml";
33    protected String applicationName= "jboss-net-web-application";
34    protected String targetNameSpace= "http://www.jboss.org/net";
35    protected String prefix= "jboss-net";
36
37    public JBossNetSubTask() {
38       setTemplateURL(
39          getClass().getClassLoader().getResource(getTemplateName()));
40       setDestinationFile(GENERATED_FILE_NAME);
41       setSchema(SOAP_SCHEMA);
42       setHavingClassTag("jboss-net.web-service");
43       setValidateXML(false);
44       setSubTaskName(SUBTASK_NAME);
45    }
46
47    protected abstract String getTemplateName();
48    
49    public String getWebDeploymentName() {
50       return applicationName;
51    }
52
53    public String getTargetNameSpace() {
54       return this.targetNameSpace;
55    }
56
57    public String getPrefix() {
58       return this.prefix;
59    }
60
61    public void setWebDeploymentName(String name) {
62       this.applicationName= name;
63    }
64
65    public void setTargetNameSpace(String name) {
66       this.targetNameSpace= name;
67    }
68
69    public void setPrefix(String prefix) {
70       this.prefix= prefix;
71    }
72
73    public void engineStarted() {
74    }
75
76 }
77
Popular Tags