KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > tool > codegen > internal > AppOptionSet


1
2 /*
3  * Enhydra Java Application Server Project
4  *
5  * The contents of this file are subject to the Enhydra Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License on
8  * the Enhydra web site ( http://www.enhydra.org/ ).
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific terms governing rights and limitations
13  * under the License.
14  *
15  * The Initial Developer of the Enhydra Application Server is Lutris
16  * Technologies, Inc. The Enhydra Application Server and portions created
17  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
18  * All Rights Reserved.
19  *
20  * Contributor(s):
21  * Paul Mahar
22  *
23  */

24 package org.enhydra.tool.codegen.internal;
25
26 // ToolBox imports
27
import org.enhydra.tool.ToolBoxInfo;
28 import org.enhydra.tool.codegen.ProjectOptionSet;
29 import org.enhydra.tool.codegen.GeneratorException;
30 import org.enhydra.tool.codegen.GeneratorOption;
31 import org.enhydra.tool.codegen.Constants;
32
33 // Standard imports
34
import java.io.File JavaDoc;
35 import java.util.StringTokenizer JavaDoc;
36 import java.util.ResourceBundle JavaDoc;
37
38 /**
39  * This class instantiates a set of default GeneratorOptions during
40  * initialization. The default options include: project, d, package
41  * copywrite, copywritefile, make, script, j2ee and overwrite.
42  */

43 public class AppOptionSet extends ProjectOptionSet implements Constants {
44
45     /**
46      * Property client option.
47      */

48     public static final String JavaDoc CLIENT = "client"; // nores
49

50     public AppOptionSet() {
51         super();
52         String JavaDoc[] docTypes = new String JavaDoc[0];
53         StringBuffer JavaDoc clientBuf = new StringBuffer JavaDoc();
54         boolean e4 = false;
55
56         e4 = (!ToolBoxInfo.isEnhydra3());
57         docTypes = ToolBoxInfo.getSupportedDocTypes();
58         clientBuf.append(res.getString("Application_client"));
59         clientBuf.append(' ');
60         for (int i = 0; i < docTypes.length; i++) {
61             if (i > 0) {
62                 clientBuf.append(',');
63                 clientBuf.append(' ');
64             }
65             clientBuf.append(docTypes[i].toUpperCase());
66         }
67         try {
68             add(new GeneratorOption(CLIENT, TYPE_HTML.toUpperCase(),
69                                     res.getString("CLIENT"),
70                                     clientBuf.toString(), false, true));
71         } catch (GeneratorException e) {
72             e.printStackTrace();
73         }
74     }
75
76 }
77
Popular Tags