source: trunk/gsdl3/src/java/org/greenstone/admin/GAI.java@ 10929

Last change on this file since 10929 was 10929, checked in by kjdon, 18 years ago

merged Chi's admin stuff from ant install branch into main repository

  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/**
2 *#########################################################################
3 *
4 * A component of the Gatherer application, part of the Greenstone digital
5 * library suite from the New Zealand Digital Library Project at the
6 * University of Waikato, New Zealand.
7 *
8 * Author: Chi-Yu Huang, Greenstone Digital Library, University of Waikato
9 *
10 * Copyright (C) 1999 New Zealand Digital Library Project
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 *########################################################################
26 */
27// Graphical Adminstration Interface
28package org.greenstone.admin;
29
30import java.awt.*;
31import java.awt.event.*;
32import java.io.*;
33import java.lang.*;
34import java.net.*;
35import java.util.*;
36import javax.swing.*;
37import javax.swing.plaf.*;
38import javax.swing.text.*;
39
40import org.greenstone.admin.GAIManager;
41import org.greenstone.core.Configuration;
42import org.greenstone.core.Dictionary;
43import org.greenstone.admin.gui.SetServerPane;
44
45/** Containing the top-level "core" for the GAI(Graphical Administration
46 * Interface) this class is the common core for the GAI application and
47 * applet. It first parses the command line arguments, preparing to update
48 * the configuration as required. Next it loads several important support
49 * classes such as the Configuration and Dictionary. Finally it creates the
50 * other important managers and sends them on their way.
51 * @author Chi-Yu Huang, Greenstone Digital Library, University of Waikato
52 * @version ###
53 */
54public class GAI
55{
56 public static Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize();
57 public static String gsdl3_path;
58 public static String admin_path;
59 public static String tomcat_file_path;
60 public static String images_path;
61 public static File build_file;
62 public static File site_conf;
63 public static File interface_conf;
64 /** A public reference to the GAIManager. */
65 static public GAIManager ga_man;
66
67 public GAI()
68 {
69 this.gsdl3_path = gsdl3_path;
70 this.admin_path = this.gsdl3_path + "/src/java/org/greenstone/admin/";
71 this.tomcat_file_path = this.gsdl3_path + "/comms/jakarta/tomcat/logs/";
72 this.images_path = this.admin_path + "images/";
73 this.build_file = new File(gsdl3_path, "build.properties");
74 this.site_conf = new File (gsdl3_path,"/web/sites/localsite/siteConfig.xml");
75 this.interface_conf = new File (gsdl3_path, "/web/interfaces/default/interfaceConfig.xml");
76 init();
77 }
78
79 public static void main (String[] args){
80 gsdl3_path = args[0];
81 admin_path = gsdl3_path + "/src/java/org/greenstone/admin/";
82 new Configuration (admin_path);
83 GAI gai = new GAI();
84
85 ga_man = new GAIManager(screen_size);
86 ga_man.display();
87 }
88
89 public void init (){
90 // Read Dictionary
91 new Dictionary(Configuration.getLocale("general.locale", true), Configuration.getFont("general.font", true));
92
93 }
94}
95
96
Note: See TracBrowser for help on using the repository browser.