ruper2/src/java/core/org/krysalis/ruper/config RuperConfig.java,1.5,1.6
| Newsgroups | gmane.comp.krysalis.metamorphosis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/config
In directory sc8-pr-cvs1:/tmp/cvs-serv2507/src/java/core/org/krysalis/ruper/config
Modified Files:
RuperConfig.java
Log Message:
Message format - loading a resource bundle as per the default locale
- need to add all the message constants
Index: RuperConfig.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/config/RuperConfig.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RuperConfig.java 12 Sep 2003 15:19:42 -0000 1.5
--- RuperConfig.java 22 Sep 2003 19:18:32 -0000 1.6
***************
*** 18,46 ****
* @author anou_mana
*/
! public class RuperConfig
! {
private static boolean l_configured = false;
! public static void configure(String configFileName)
! {
! try
! {
! File configFile = new File(configFileName);
!
! XMLEntryTable xmlEntryTable = new ConfigXMLEntryTable();
! XMLParser parser = new XMLParser(xmlEntryTable);
! XMLContext xmlContext = parser.parse(configFile);
}
! catch (Exception exp)
! {
! Logger.getLog().error(Messages.getString(MessageConstants.CONFIG_ERROR), exp);
}
}
! public static void configure()
! {
! if (!l_configured)
! {
configure(RuperConstants.DEFAULT_CONFIG_XML);
--- 18,50 ----
* @author anou_mana
*/
! public class RuperConfig {
private static boolean l_configured = false;
! public static void configure(String configFileName) {
! try {
! File configFile = new File(configFileName);
! if(configFile.exists()){
! XMLEntryTable xmlEntryTable = new ConfigXMLEntryTable();
!
! XMLParser parser = new XMLParser(xmlEntryTable);
! XMLContext xmlContext = parser.parse(configFile);
! }
! else
! Logger.getLog().error(
! Messages.getString(
! MessageConstants.UNABLE_TO_LOAD_CONFIG_FILE,
! new Object[] { configFileName }));
!
}
! catch (Exception exp) {
! Logger.getLog().error(
! Messages.getString(MessageConstants.CONFIG_ERROR),
! exp);
}
}
! public static void configure() {
! if (!l_configured) {
configure(RuperConstants.DEFAULT_CONFIG_XML);
***************
*** 49,54 ****
}
! public static void main(String[] args) throws Exception
! {
RuperConfig.configure();
--- 53,57 ----
}
! public static void main(String[] args) throws Exception {
RuperConfig.configure();
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf