01: /*
02: * Enhydra Java Application Server Project
03: *
04: * The contents of this file are subject to the Enhydra Public License
05: * Version 1.1 (the "License"); you may not use this file except in
06: * compliance with the License. You may obtain a copy of the License on
07: * the Enhydra web site ( http://www.enhydra.org/ ).
08: *
09: * 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.OtterProject;
33:
34: /**
35: * Class declaration
36: *
37: *
38: * @author Paul Mahar
39: */
40: public class Enhydra3AppUtil extends AppGenUtil {
41:
42: // string not to be resourced
43: private final static String DEFAULT_COMMAND_NAME = "en3app"; // nores
44:
45: //
46: public Enhydra3AppUtil() throws CodeGenException {
47: super (new Enhydra3AppGenerator());
48: }
49:
50: public Enhydra3AppUtil(OtterProject project)
51: throws CodeGenException {
52: super (project, new Enhydra3AppGenerator());
53: }
54:
55: public Enhydra3AppUtil(OtterProject project,
56: Enhydra3AppGenerator gen) throws CodeGenException {
57: super (project, gen);
58: }
59:
60: public static ProjectGenerator createGenerator() {
61: return new Enhydra3AppGenerator();
62: }
63:
64: public static String getCommandName() {
65: String commandName = DEFAULT_COMMAND_NAME;
66:
67: if (KelpInfo.isClassPathComplete()) {
68: commandName = Enhydra3AppGenerator.COMMAND_NAME;
69: }
70: return commandName;
71: }
72:
73: /**
74: * Method declaration
75: *
76: *
77: * @return
78: */
79: public static String getDisplayName() {
80: String displayName = res.getString("Enhydra_Super_Servlet");
81:
82: if (KelpInfo.isClassPathComplete()) {
83: displayName = Enhydra3AppGenerator.displayName;
84: }
85: return displayName;
86: }
87:
88: }
|