KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > projectmanagement > ProjectManagement


1 /*
2  * projectManagement
3  *
4  * Enhydra super-servlet
5  *
6  */

7
8 package projectmanagement;
9
10
11 import com.lutris.appserver.server.*;
12 import com.lutris.appserver.server.httpPresentation.*;
13 import com.lutris.appserver.server.session.*;
14 import com.lutris.util.*;
15
16 /**
17  * The application object.
18  *
19  * Application-wide data would go here.
20  */

21 public class ProjectManagement extends StandardApplication {
22
23    // The user who is allowed to run this application. Used with basic auth.
24
private String JavaDoc adminUsername, adminPassword, locale;
25
26    /**
27     * Start the application.
28     *
29     * @param appConfig
30     * Configuration object for this application.
31     * @exception ApplicationException
32     * If an error occurs starting the application.
33     */

34    public void startup(Config appConfig) throws ApplicationException {
35       //Mandatory config settings.
36
try {
37          adminUsername = appConfig.getString("ProjectManagement.AdminUsername");
38          adminPassword = appConfig.getString("ProjectManagement.AdminPassword");
39
40       } catch (ConfigException except) {
41          throw new ApplicationException(except);
42       }
43       super.startup(appConfig);
44    }
45
46    public boolean requestPreprocessor(HttpPresentationComms comms)
47          throws Exception JavaDoc {
48
49       return super.requestPreprocessor(comms);
50    }
51
52    public String JavaDoc getAdminUsername () {
53       return adminUsername;
54    }
55
56    public String JavaDoc getAdminPassword () {
57       return adminPassword;
58    }
59
60    /**
61     * This is an optional function, used only by the Multiserver's graphical
62     * administration. This bit of HTML appears in the status page for this
63     * application. You could add extra status info, for example
64     * a list of currently logged in users.
65     *
66     * @return HTML that is displayed in the status page of the Multiserver.
67     */

68    public String JavaDoc toHtml() {
69       return "This is <I>projectManagement</I>";
70    }
71
72 }
73
74
Popular Tags