KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > bea > wls > ejb > WebLogicSubTask


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

5 package xdoclet.modules.bea.wls.ejb;
6
7 import java.io.File JavaDoc;
8 import java.net.MalformedURLException JavaDoc;
9 import java.net.URL JavaDoc;
10
11 import xdoclet.XDocletException;
12 import xdoclet.XDocletMessages;
13 import xdoclet.modules.ejb.EjbDocletTask.EjbSpecVersion;
14 import xdoclet.modules.ejb.XDocletModulesEjbMessages;
15 import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask;
16 import xdoclet.util.LogUtil;
17 import xdoclet.util.Translator;
18
19 /**
20  * This task can generate deployment descriptors for WLS 6.0, 6.1, 7.0 and 8.1. The destinationFile attribute is ignored
21  * because this subtask creates multiple deployment descriptor files.
22  *
23  * @author <a HREF="mailto:aslak.nospam@users.sf.net">Aslak Hellesøy </a>
24  * @author <a HREF="mailto:jerome.bernard@xtremejava.com">Jerome Bernard</a>
25  * @created Sept 11, 2001
26  * @ant.element display-name="WebLogic Server" name="weblogic" parent="xdoclet.modules.ejb.EjbDocletTask"
27  * @version $Revision: 1.29 $
28  * @xdoclet.merge-file file="weblogic-cmp-rdbms-beans.xml" relates-to="weblogic-cmp-rdbms-jar.xml" description="An XML
29  * unparsed entity containing weblogic-rdbms-bean for any CMP entity beans not processed by XDoclet."
30  * @xdoclet.merge-file file="weblogic-cmp-rdbms-relationships.xml" relates-to="weblogic-cmp-rdbms-jar.xml"
31  * description="An XML unparsed entity containing weblogic-rdbms-relation for any CMR relationships of CMP entity
32  * beans not processed by XDoclet."
33  * @xdoclet.merge-file file="weblogic-enterprise-beans.xml" relates-to="weblogic-ejb-jar.xml" description="An XML
34  * unparsed entity containing weblogic-enterprise-bean elements for any beans not processed by XDoclet."
35  * @xdoclet.merge-file file="weblogic-security-role-assignment.xml" relates-to="weblogic-ejb-jar.xml" description="An
36  * XML unparsed entity containing security-role-assignment elements."
37  * @xdoclet.merge-file file="weblogic-run-as-role-assignment.xml" relates-to="weblogic-ejb-jar.xml" description="An
38  * XML unparsed entity containing run-as-role-assignment elements." *
39  */

40 public class WebLogicSubTask extends AbstractEjbDeploymentDescriptorSubTask
41 {
42     private final static String JavaDoc WEBLOGIC_DEFAULT_TEMPLATE_FILE = "resources/weblogic-ejb-jar-xml.xdt";
43
44     private final static String JavaDoc WEBLOGIC_DD_FILE_NAME = "weblogic-ejb-jar.xml";
45
46     private final static String JavaDoc WEBLOGIC_DD_PUBLICID_61 = "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN";
47
48     private final static String JavaDoc WEBLOGIC_DD_PUBLICID_70 = "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN";
49
50     private final static String JavaDoc WEBLOGIC_DD_PUBLICID_81 = "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN";
51
52     private final static String JavaDoc WEBLOGIC_DD_SYSTEMID_61 = "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd";
53
54     private final static String JavaDoc WEBLOGIC_DD_SYSTEMID_70 = "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd";
55
56     private final static String JavaDoc WEBLOGIC_DD_SYSTEMID_81 = "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd";
57
58     private final static String JavaDoc WEBLOGIC_DTD_FILE_NAME_61 = "resources/weblogic600-ejb-jar.dtd";
59
60     private final static String JavaDoc WEBLOGIC_DTD_FILE_NAME_70 = "resources/weblogic700-ejb-jar.dtd";
61
62     private final static String JavaDoc WEBLOGIC_DTD_FILE_NAME_81 = "resources/weblogic810-ejb-jar.dtd";
63
64     private final static String JavaDoc WEBLOGIC_CMP_DEFAULT_TEMPLATE_FILE = "resources/weblogic-cmp-rdbms-jar-xml.xdt";
65
66     private final static String JavaDoc WEBLOGIC_CMP_DD_FILE_NAME = "weblogic-cmp-rdbms-jar.xml";
67
68     private final static String JavaDoc WEBLOGIC_CMP11_PUBLICID_61 = "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB 1.1 RDBMS Persistence//EN";
69
70     private final static String JavaDoc WEBLOGIC_CMP11_PUBLICID_70 = "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB 1.1 RDBMS Persistence//EN";
71
72     private final static String JavaDoc WEBLOGIC_CMP20_PUBLICID_61 = "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN";
73
74     private final static String JavaDoc WEBLOGIC_CMP20_PUBLICID_70 = "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN";
75
76     private final static String JavaDoc WEBLOGIC_CMP20_PUBLICID_81 = "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN";
77
78     private final static String JavaDoc WEBLOGIC_CMP11_SYSTEMID_61 = "http://www.bea.com/servers/wls600/dtd/weblogic-rdbms11-persistence-600.dtd";
79
80     private final static String JavaDoc WEBLOGIC_CMP11_SYSTEMID_70 = "http://www.bea.com/servers/wls700/dtd/weblogic-rdbms11-persistence-700.dtd";
81
82     private final static String JavaDoc WEBLOGIC_CMP20_SYSTEMID_61 = "http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd";
83
84     private final static String JavaDoc WEBLOGIC_CMP20_SYSTEMID_70 = "http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd";
85
86     private final static String JavaDoc WEBLOGIC_CMP20_SYSTEMID_81 = "http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd";
87
88     private final static String JavaDoc WEBLOGIC_CMP11_DTD_FILE_NAME_61 = "resources/weblogic-rdbms11-persistence-600.dtd";
89
90     private final static String JavaDoc WEBLOGIC_CMP11_DTD_FILE_NAME_70 = "resources/weblogic-rdbms11-persistence-700.dtd";
91
92     private final static String JavaDoc WEBLOGIC_CMP20_DTD_FILE_NAME_61 = "resources/weblogic-rdbms20-persistence-600.dtd";
93
94     private final static String JavaDoc WEBLOGIC_CMP20_DTD_FILE_NAME_70 = "resources/weblogic-rdbms20-persistence-700.dtd";
95
96     private final static String JavaDoc WEBLOGIC_CMP20_DTD_FILE_NAME_81 = "resources/weblogic-rdbms20-persistence-810.dtd";
97
98     private final static String JavaDoc DEFAULT_PERSISTENCE = "weblogic";
99
100     private String JavaDoc version = Version.VERSION_6_1;
101
102     private String JavaDoc dataSource = "";
103     private String JavaDoc poolName = "";
104
105     private String JavaDoc createTables = "";
106     private String JavaDoc persistence = DEFAULT_PERSISTENCE;
107
108     private String JavaDoc validateDbSchemaWith = "";
109
110     private String JavaDoc databaseType = "";
111
112     private boolean orderDatabaseOperations = true;
113     private boolean enableBatchOperations = true;
114     private boolean enableBeanClassRedeploy = false;
115
116     private URL JavaDoc ejbJarXml = null;
117     private URL JavaDoc cmpRdbmsJarXml = null;
118
119     public WebLogicSubTask()
120     {
121         // set the default templates to use.
122
ejbJarXml = getClass().getResource(WEBLOGIC_DEFAULT_TEMPLATE_FILE);
123         cmpRdbmsJarXml = getClass().getResource(WEBLOGIC_CMP_DEFAULT_TEMPLATE_FILE);
124     }
125
126     /**
127      * Gets the database type specified in the weblogic deployment descriptor. This is a WLS 7.0 and higher feature.
128      * Possible values: DB2 INFORMIX ORACLE SQL_SERVER SYBASE POINTBASE
129      *
130      * @return DatabaseType
131      */

132     public String JavaDoc getDatabaseType()
133     {
134         return databaseType;
135     }
136
137     /**
138      * Gets the Datasource attribute of the WebLogicSubTask object
139      *
140      * @return The Datasource value
141      */

142     public String JavaDoc getDatasource()
143     {
144         return dataSource;
145     }
146
147     public String JavaDoc getPoolname()
148     {
149         return poolName;
150     }
151
152     /**
153      * Gets the Version attribute of the WebLogicSubTask object
154      *
155      * @return The Version value
156      */

157     public String JavaDoc getVersion()
158     {
159         return version;
160     }
161
162     /**
163      * Gets the Createtables attribute of the WebLogicSubTask object
164      *
165      * @return The Createtables value
166      */

167     public String JavaDoc getCreatetables()
168     {
169         return createTables;
170     }
171
172     public String JavaDoc getPersistence()
173     {
174         return persistence;
175     }
176
177     public String JavaDoc getValidateDbSchemaWith()
178     {
179         return validateDbSchemaWith;
180     }
181
182     public String JavaDoc getOrderDatabaseOperations()
183     {
184         return orderDatabaseOperations ? "True" : "False";
185     }
186
187     public String JavaDoc getEnableBatchOperations()
188     {
189         return enableBatchOperations ? "True" : "False";
190     }
191
192     public String JavaDoc getEnableBeanClassRedeploy()
193     {
194         return enableBeanClassRedeploy ? "True" : "False";
195     }
196
197     /**
198      * Sets the template file for generation of weblogic-ejb-jar.xml.
199      *
200      * @param templateFile
201      * @exception XDocletException
202      * @see xdoclet.TemplateSubTask#setTemplateFile(java.io.File)
203      */

204     public void setTemplateFile(File JavaDoc templateFile) throws XDocletException
205     {
206         if (templateFile.exists()) {
207             try {
208                 ejbJarXml = templateFile.toURL();
209             }
210             catch (MalformedURLException JavaDoc e) {
211                 throw new XDocletException(e.getMessage());
212             }
213         }
214         else {
215             throw new XDocletException("Couldn't find template for weblogic-ejb-jar.xml: " + templateFile.getAbsolutePath());
216         }
217     }
218
219     /**
220      * Sets the template file for generation of weblogic-cmp-rdbms-jar.xml.
221      *
222      * @param templateFile the file name (real file!) of the template
223      * @exception XDocletException
224      * @ant.not-required Yes if its a nested <template/> element.
225      */

226     public void setCmpTemplateFile(File JavaDoc templateFile) throws XDocletException
227     {
228         if (templateFile.exists()) {
229             try {
230                 cmpRdbmsJarXml = templateFile.toURL();
231             }
232             catch (MalformedURLException JavaDoc e) {
233                 throw new XDocletException(e.getMessage());
234             }
235         }
236         else {
237             throw new XDocletException("Couldn't find template: " + templateFile.getAbsolutePath());
238         }
239     }
240
241     public void setOrderDatabaseOperations(boolean flag)
242     {
243         this.orderDatabaseOperations = flag;
244     }
245
246     public void setEnableBatchOperations(boolean flag)
247     {
248         this.enableBatchOperations = flag;
249     }
250
251     public void setEnableBeanClassRedeploy(boolean flag)
252     {
253         this.enableBeanClassRedeploy = flag;
254     }
255
256     /**
257      * Sets the database type specified in the weblogic-cmp-rdbms-jar.xml deployment descriptor. This is a WLS 7.0 and
258      * higher feature. Possible values: DB2 INFORMIX ORACLE SQL_SERVER SYBASE POINTBASE
259      *
260      * @param databaseType
261      * @ant.not-required No, only used with 7.0 upwards, and optional even then.
262      */

263     public void setDatabaseType(DatabaseTypes databaseType)
264     {
265         this.databaseType = databaseType.getValue();
266     }
267
268     /**
269      * Specifies a default value for the pool-name element in the CMP descriptor, to use if no weblogic.pool-name tag
270      * appears on a bean (only applies when ejbspec=1.1)
271      *
272      * @param s
273      * @ant.not-required
274      */

275     public void setPoolname(String JavaDoc s)
276     {
277         poolName = s;
278     }
279
280     /**
281      * Specifies a default value for the data-source-name element in the CMP descriptor, to use if no
282      * weblogic.data-source-name tag appears on a bean.
283      *
284      * @param dataSource
285      * @ant.not-required
286      */

287     public void setDatasource(String JavaDoc dataSource)
288     {
289         this.dataSource = dataSource;
290     }
291
292     /**
293      * Sets the target WebLogic version to generate for. Possible values are 6.1, 7.0 and 8.1
294      *
295      * @param version The new Version value
296      * @ant.not-required No, default is 6.1
297      */

298     public void setVersion(Version version)
299     {
300         this.version = version.getValue();
301     }
302
303     /**
304      * Sets the persistence type to use. Useful if you're using a different persistence manager like MVCSoft
305      *
306      * @param persistence
307      * @ant.not-required No, default is "weblogic"
308      */

309     public void setPersistence(String JavaDoc persistence)
310     {
311         this.persistence = persistence;
312     }
313
314     /**
315      * If "True" or "CreateOnly", then at deployment time if there is no Table in the Database for a CMP Bean, the
316      * Container will attempt to CREATE the Table (based on information found in the deployment files and in the Bean
317      * Class). Valid values are "True" and "False" for WLS Servers &lt; Version 8.1 and "CreateOnly", "DropAndCreate",
318      * "DropAndCreateAlways", "AlterOrCreate" and "Disabled" for WLS Servers &gt;= 8.1.
319      *
320      * @param flag The new Createtables value
321      * @ant.not-required No, default is "False" for WLS Servers &lt; Version 8.1 and "Disabled" for WLS Servers &gt;=
322      * 8.1
323      */

324     public void setCreatetables(CreateTablesType flag)
325     {
326         this.createTables = flag.getValue();
327     }
328
329     /**
330      * The CMP subsystem checks that beans have been mapped to a valid database schema at deployment time. A value of
331      * 'MetaData' means that JDBC metadata is used to validate the schema. A value of 'TableQuery' means that tables are
332      * queried directly to ascertain that they have the schema expected by the CMP runtime.
333      *
334      * @param type
335      * @ant.not-required
336      */

337     public void setValidateDbSchemaWith(ValidateDbSchemaWithTypes type)
338     {
339         validateDbSchemaWith = type.getValue();
340     }
341
342     /**
343      * Called to validate configuration parameters.
344      *
345      * @exception XDocletException Description of Exception
346      */

347     public void validateOptions() throws XDocletException
348     {
349         // WebLogic does not require a template url or a destination file
350
//
351
// super.validateOptions();
352
CreateTablesType tblType = new CreateTablesType();
353
354         String JavaDoc versionStr = getVersion();
355         int index = tblType.indexOfValue(getCreatetables());
356
357         int index_lo_8_1 = tblType.indexOfValue(CreateTablesType.TRUE);
358         int index_hi_8_1 = tblType.indexOfValue(CreateTablesType.ALTER_OR_CREATE);
359
360         if (versionStr.compareTo(Version.VERSION_8_1) < 0) {
361             // Version prior to Weblogic 8.1
362
if (index > index_lo_8_1) {
363                 throw new XDocletException("Argument for createtables must be one of (" +
364                     CreateTablesType.TRUE + "|" +
365                     CreateTablesType.FALSE +
366                     ") if version attribute is < 8.1");
367             }
368         }
369         else {
370             // Weblogic 8.1 or greater
371
if ((index <= index_lo_8_1) || (index > index_hi_8_1)) {
372                 throw new XDocletException("Argument for createtables must be one of (" +
373                     CreateTablesType.DISABLED + "|" +
374                     CreateTablesType.CREATE_ONLY + "|" +
375                     CreateTablesType.DROP_AND_CREATE + "|" +
376                     CreateTablesType.DROP_AND_CREATE_ALWAYS + "|" +
377                     CreateTablesType.ALTER_OR_CREATE +
378                     ") if version attribute is >= 8.1");
379             }
380         }
381     }
382
383     /**
384      * @exception XDocletException
385      * @see xdoclet.SubTask#execute()
386      */

387     public void execute() throws XDocletException
388     {
389         setDestinationFile(WEBLOGIC_DD_FILE_NAME);
390         setTemplateURL(ejbJarXml);
391
392         if (getVersion().equals(Version.VERSION_6_1) || getVersion().equals(Version.VERSION_6_0)) {
393             setPublicId(WEBLOGIC_DD_PUBLICID_61);
394             setSystemId(WEBLOGIC_DD_SYSTEMID_61);
395             setDtdURL(getClass().getResource(WEBLOGIC_DTD_FILE_NAME_61));
396         }
397         else if (getVersion().equals(Version.VERSION_7_0)) {
398             setPublicId(WEBLOGIC_DD_PUBLICID_70);
399             setSystemId(WEBLOGIC_DD_SYSTEMID_70);
400             setDtdURL(getClass().getResource(WEBLOGIC_DTD_FILE_NAME_70));
401         }
402         else {
403             setPublicId(WEBLOGIC_DD_PUBLICID_81);
404             setSystemId(WEBLOGIC_DD_SYSTEMID_81);
405             setDtdURL(getClass().getResource(WEBLOGIC_DTD_FILE_NAME_81));
406         }
407
408         startProcess();
409
410         if (atLeastOneCmpEntityBeanExists()) {
411             if (DEFAULT_PERSISTENCE.equals(getPersistence())) {
412                 setDestinationFile(WEBLOGIC_CMP_DD_FILE_NAME);
413                 setTemplateURL(cmpRdbmsJarXml);
414
415                 String JavaDoc specVers = (String JavaDoc) getContext().getConfigParam("EjbSpec");
416
417                 if (specVers.equals(EjbSpecVersion.EJB_2_1)) {
418                     specVers = EjbSpecVersion.EJB_2_0;
419                     LogUtil.getLog(getClass(), "execute").warn("EJB spec version 2.1 unknown for WLS subtask. Falling back to 2.0");
420                 }
421                 if (specVers.equals(EjbSpecVersion.EJB_1_1)) {
422                     if (getVersion().equals(Version.VERSION_6_1) || getVersion().equals(Version.VERSION_6_0)) {
423                         setPublicId(WEBLOGIC_CMP11_PUBLICID_61);
424                         setSystemId(WEBLOGIC_CMP11_SYSTEMID_61);
425                         setDtdURL(getClass().getResource(WEBLOGIC_CMP11_DTD_FILE_NAME_61));
426                     }
427                     else {
428                         setPublicId(WEBLOGIC_CMP11_PUBLICID_70);
429                         setSystemId(WEBLOGIC_CMP11_SYSTEMID_70);
430                         setDtdURL(getClass().getResource(WEBLOGIC_CMP11_DTD_FILE_NAME_70));
431                     }
432                 }
433                 else if (specVers.equals(EjbSpecVersion.EJB_2_0)) {
434                     if (getVersion().equals(Version.VERSION_6_1) || getVersion().equals(Version.VERSION_6_0)) {
435                         setPublicId(WEBLOGIC_CMP20_PUBLICID_61);
436                         setSystemId(WEBLOGIC_CMP20_SYSTEMID_61);
437                         setDtdURL(getClass().getResource(WEBLOGIC_CMP20_DTD_FILE_NAME_61));
438                     }
439                     else if (getVersion().equals(Version.VERSION_7_0)) {
440                         setPublicId(WEBLOGIC_CMP20_PUBLICID_70);
441                         setSystemId(WEBLOGIC_CMP20_SYSTEMID_70);
442                         setDtdURL(getClass().getResource(WEBLOGIC_CMP20_DTD_FILE_NAME_70));
443                     }
444                     else {
445                         setPublicId(WEBLOGIC_CMP20_PUBLICID_81);
446                         setSystemId(WEBLOGIC_CMP20_SYSTEMID_81);
447                         setDtdURL(getClass().getResource(WEBLOGIC_CMP20_DTD_FILE_NAME_81));
448                     }
449                 }
450                 else {
451                     throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.UNSUPPORTED_EJB_SPEC, new String JavaDoc[]{getContext().getConfigParam("EjbSpec").toString()}));
452                 }
453             }
454             else {
455                 LogUtil.getLog(getClass(), "execute").warn(Translator.getString(XDocletModulesBeaWlsEjbMessages.class, XDocletModulesBeaWlsEjbMessages.NON_WEBLOGIC_PERSISTENCE, new String JavaDoc[]{getPersistence()}));
456             }
457
458             startProcess();
459         }
460     }
461
462     /**
463      * Describe what the method does
464      *
465      * @exception XDocletException Describe the exception
466      */

467     protected void engineStarted() throws XDocletException
468     {
469         if (getDestinationFile().equals(WEBLOGIC_DD_FILE_NAME)) {
470             System.out.println(Translator.getString(XDocletMessages.class, XDocletMessages.GENERATING_SOMETHING, new String JavaDoc[]{WEBLOGIC_DD_FILE_NAME}));
471         }
472         else if (getDestinationFile().equals(WEBLOGIC_CMP_DD_FILE_NAME)) {
473             System.out.println(Translator.getString(XDocletMessages.class, XDocletMessages.GENERATING_SOMETHING, new String JavaDoc[]{WEBLOGIC_CMP_DD_FILE_NAME}));
474         }
475     }
476
477     /**
478      * Legal values of the validate-db-schema-with in weblogic-rdbms20-persistence-600.dtd
479      *
480      * @created 17. juni 2002
481      */

482     public static class ValidateDbSchemaWithTypes extends org.apache.tools.ant.types.EnumeratedAttribute
483     {
484         public final static String JavaDoc META_DATA = "MetaData";
485
486         public final static String JavaDoc TABLE_QUERY = "TableQuery";
487
488         /**
489          * Gets the Values attribute of the ValidateDbSchemaWithTypes object
490          *
491          * @return The Values value
492          */

493         public java.lang.String JavaDoc[] getValues()
494         {
495             return (new java.lang.String JavaDoc[]{
496                 META_DATA, TABLE_QUERY
497                 });
498         }
499     }
500
501     /**
502      * Legal values of the database-type in weblogic-rdbms20-persistence-700.dtd
503      *
504      * @created 02 april 2003
505      */

506     public static class DatabaseTypes extends org.apache.tools.ant.types.EnumeratedAttribute
507     {
508         public final static String JavaDoc DB2 = "DB2";
509         public final static String JavaDoc INFORMIX = "INFORMIX";
510         public final static String JavaDoc ORACLE = "ORACLE";
511         public final static String JavaDoc SQL_SERVER = "SQL_SERVER";
512         public final static String JavaDoc SYBASE = "SYBASE";
513         public final static String JavaDoc POINTBASE = "POINTBASE";
514
515         /**
516          * Gets the Values attribute of the DatabaseTypes object
517          *
518          * @return The Values value
519          */

520         public java.lang.String JavaDoc[] getValues()
521         {
522             return (new java.lang.String JavaDoc[]{
523                 DB2, INFORMIX, ORACLE, SQL_SERVER, SYBASE, POINTBASE
524                 });
525         }
526     }
527
528     /**
529      * Supported WLS versions.
530      *
531      * @created 17. juni 2002
532      */

533     public static class Version extends org.apache.tools.ant.types.EnumeratedAttribute
534     {
535         public final static String JavaDoc VERSION_6_0 = "6.0";
536         public final static String JavaDoc VERSION_6_1 = "6.1";
537         // Have to add support for x.x.x version numbers in ConfigTagsHandler
538
//public final static String VERSION_6_1_2 = "6.1.2";
539
// NOT FULLY SUPPORTED YET
540
public final static String JavaDoc VERSION_7_0 = "7.0";
541         public final static String JavaDoc VERSION_8_1 = "8.1";
542
543         /**
544          * Gets the Values attribute of the Version object
545          *
546          * @return The Values value
547          */

548         public java.lang.String JavaDoc[] getValues()
549         {
550             return (new java.lang.String JavaDoc[]{
551                 VERSION_6_0, VERSION_6_1, VERSION_7_0, VERSION_8_1
552                 });
553         }
554     }
555
556     /**
557      * @created 30 july 2004
558      */

559     public static class CreateTablesType extends org.apache.tools.ant.types.EnumeratedAttribute
560     {
561         // Valid values for Weblogic prior to version 8.1
562
public final static String JavaDoc FALSE = "False";
563         public final static String JavaDoc TRUE = "True";
564
565         // Valid values for Weblogic 8.1 or greater.
566
public final static String JavaDoc DISABLED = "Disabled";
567         public final static String JavaDoc CREATE_ONLY = "CreateOnly";
568         public final static String JavaDoc DROP_AND_CREATE = "DropAndCreate";
569         public final static String JavaDoc DROP_AND_CREATE_ALWAYS = "DropAndCreateAlways";
570         public final static String JavaDoc ALTER_OR_CREATE = "AlterOrCreate";
571
572         /**
573          * Gets the Values attribute of the createTables object
574          *
575          * @return The Values value
576          */

577         public java.lang.String JavaDoc[] getValues()
578         {
579             return (new java.lang.String JavaDoc[]{
580                 FALSE, TRUE,
581                 DISABLED, CREATE_ONLY, DROP_AND_CREATE, DROP_AND_CREATE_ALWAYS, ALTER_OR_CREATE,
582                 });
583         }
584     }
585 }
586
Popular Tags