source: trunk/gsdl3/src/java/org/greenstone/gsdl3/util/ConfigVars.java@ 3769

Last change on this file since 3769 was 3574, checked in by kjdon, 22 years ago

default language for interface now added into config vars

  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1package org.greenstone.gsdl3.util;
2
3import org.w3c.dom.Document;
4import org.w3c.dom.Element;
5
6/** holds all the site setup variables
7 * includes a method to represent them as an XML node
8 *
9 * is this only applicable to the servlet type interface? should this
10 * be called ServletConfigVars? or WebServletVars?
11 */
12public class ConfigVars {
13
14 /** the name that has been given to the servlet thats running eg library
15 * not needed for other types of clients*/
16 public String library_name_=null;
17 /** the gsdl home directory
18 * where the sites and interfaces directories live */
19 public String gsdl3_home_ = null;
20 /** the name of the current site - may be null if the interface talks
21 * to a communicator */
22 public String site_name_=null;
23 /** the name of the current interface */
24 public String interface_name_=null;
25 /** the default language of the interface */
26 public String default_language_ = null;
27 /** the xml <config> element containing all the variables */
28 public Element config_xml_ = null;
29
30 /** creates the <config> Element containting the variables
31 * needed by the xslt stuff */
32 public void createXML() {
33
34 XMLConverter converter = new XMLConverter();
35 Document doc = converter.newDOM();
36
37 config_xml_ = doc.createElement(GSXML.CONFIGURATION_ELEM);
38
39 Element e;
40 e = GSXML.createTextElement(doc, "library_name", library_name_);
41 config_xml_.appendChild(e);
42 e = GSXML.createTextElement(doc, "gsdl3_home", gsdl3_home_);
43 config_xml_.appendChild(e);
44 e = GSXML.createTextElement(doc, "site_name", site_name_);
45 config_xml_.appendChild(e);
46 e = GSXML.createTextElement(doc, "interface_name", interface_name_);
47 config_xml_.appendChild(e);
48 }
49}
50
Note: See TracBrowser for help on using the repository browser.