tico.configuration
Class TSetup

java.lang.Object
  extended by tico.configuration.TSetup

public class TSetup
extends java.lang.Object

Static class that manages the application configuration. It allows to write and read from a XML file (conf/tico.conf).

Version:
1.0 Nov 20, 2006
Author:
Pablo Muñoz

Constructor Summary
TSetup()
           
 
Method Summary
static java.lang.String getEditorHome()
          Returns the editor home directory.
static java.lang.String getInterpreterHome()
          Returns the interpreter home directory.
static java.lang.String getLanguage()
          Returns the application language.
static void load()
          Loads the configuration file conf/tico.conf
static void save()
          Saves the configuration file conf/tico.conf
static void setEditorHome(java.lang.String pathEditor)
          Sets the editor home directory.
static void setInterpreterHome(java.lang.String pathInterpreter)
          Sets the interpreter home directory.
static void setLanguage(java.lang.String language)
          Sets the application language.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSetup

public TSetup()
Method Detail

load

public static void load()
                 throws javax.xml.parsers.ParserConfigurationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Loads the configuration file conf/tico.conf

Throws:
javax.xml.parsers.ParserConfigurationException - If there are syntactic error in the XML document
org.xml.sax.SAXException - If there are problems transforming the text to a XML document
java.io.IOException - If there are file problems

save

public static void save()
                 throws javax.xml.parsers.ParserConfigurationException,
                        java.io.IOException,
                        javax.xml.transform.TransformerException
Saves the configuration file conf/tico.conf

Throws:
javax.xml.parsers.ParserConfigurationException - If there are syntactic error in the XML document
java.io.IOException - If there are file problems
javax.xml.transform.TransformerException - If there are problems transforming the XML document to text

getLanguage

public static java.lang.String getLanguage()
Returns the application language.

Returns:
The application language

setLanguage

public static void setLanguage(java.lang.String language)
Sets the application language.

Parameters:
language - The application language to set

getEditorHome

public static java.lang.String getEditorHome()
Returns the editor home directory.

Returns:
The editor current home directory

setEditorHome

public static void setEditorHome(java.lang.String pathEditor)
Sets the editor home directory.

Parameters:
pathEditor - The editor current home directory to set

getInterpreterHome

public static java.lang.String getInterpreterHome()
Returns the interpreter home directory.

Returns:
The interpreter current home directory

setInterpreterHome

public static void setInterpreterHome(java.lang.String pathInterpreter)
Sets the interpreter home directory.

Parameters:
pathInterpreter - The interpreter current home directory to set