KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > common > codegen > Enhydra3AppUtil


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

23 package org.enhydra.kelp.common.codegen;
24
25 // Toolbox imports
26

27 import org.enhydra.tool.codegen.ProjectGenerator;
28 import org.enhydra.tool.codegen.internal.Enhydra3AppGenerator;
29
30 // Kelp imports
31
import org.enhydra.kelp.KelpInfo;
32 import org.enhydra.kelp.common.node.OtterNode;
33 import org.enhydra.kelp.common.node.OtterProject;
34 import org.enhydra.kelp.common.node.OtterFolderNode;
35 import org.enhydra.kelp.common.node.OtterJavaFileNode;
36 import org.enhydra.kelp.common.node.OtterTextFileNode;
37 import org.enhydra.kelp.common.node.OtterNodeFactory;
38
39 // Standard imports
40
import java.awt.Component JavaDoc;
41 import java.io.File JavaDoc;
42 import java.io.FilenameFilter JavaDoc;
43 import java.util.Vector JavaDoc;
44 import java.util.ResourceBundle JavaDoc;
45
46 /**
47  * Class declaration
48  *
49  *
50  * @author Paul Mahar
51  */

52 public class Enhydra3AppUtil extends AppGenUtil {
53
54     // string not to be resourced
55
private final static String JavaDoc DEFAULT_COMMAND_NAME = "en3app"; // nores
56

57     //
58
public Enhydra3AppUtil() throws CodeGenException {
59         super(new Enhydra3AppGenerator());
60     }
61
62     public Enhydra3AppUtil(OtterProject project) throws CodeGenException {
63         super(project, new Enhydra3AppGenerator());
64     }
65
66     public Enhydra3AppUtil(OtterProject project, Enhydra3AppGenerator gen) throws CodeGenException {
67         super(project, gen);
68     }
69
70
71     public static ProjectGenerator createGenerator() {
72         return new Enhydra3AppGenerator();
73     }
74
75     public static String JavaDoc getCommandName() {
76         String JavaDoc commandName = DEFAULT_COMMAND_NAME;
77
78         if (KelpInfo.isClassPathComplete()) {
79             commandName = Enhydra3AppGenerator.COMMAND_NAME;
80         }
81         return commandName;
82     }
83
84     /**
85      * Method declaration
86      *
87      *
88      * @return
89      */

90     public static String JavaDoc getDisplayName() {
91         String JavaDoc displayName = res.getString("Enhydra_Super_Servlet");
92
93         if (KelpInfo.isClassPathComplete()) {
94             displayName = Enhydra3AppGenerator.displayName;
95         }
96         return displayName;
97     }
98
99 }
100
Popular Tags