Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jChatBox.Util
Class XMLConfig

    java.lang.Object
      |
      +--jChatBox.Util.XMLConfig

public class XMLConfig
extends java.lang.Object

This class implements features to read/save jChatBox XML system configuration file.
DOM have been chosen to model XML. All fields and methods are static.

Field Summary
`static java.lang.String` | `_XMLfilename`
`static java.lang.String` | `_XMLUsersfilename`
`static java.lang.String` | `AUTOCONFIG`
`static java.lang.String` | `BACKUPFILE`
`static java.lang.String` | `BACKUPFILENAME`
`static java.lang.String` | `CONFFOLDER` Path to jChatBox conf folder (Not ending with a separator)
`static java.lang.Object` | `CONTEXT`
`static java.lang.String` | `COOKIEID`
`static java.lang.String` | `DEFAULTLANGUAGE`
`static int` | `DISPLAYMODE`
`static java.util.Vector` | `FILTERS`
`static java.util.Vector` | `FILTERSCLASSES`
`static int` | `HISTORY`
`static java.util.Hashtable` | `LANGUAGES`
`static java.lang.String` | `LICENSE`
`static java.lang.String` | `LINESEPARATOR` Line separator
`static java.util.Vector` | `LISTENERS`
`static java.util.Vector` | `LISTENERSCLASSES`
`static java.lang.String` | `LOGFOLDER`
`static int` | `MAXUSERS`
`static java.lang.String` | `MESSAGESESSIONID`
`static java.util.Hashtable` | `MODERATORS`
`static boolean` | `PRIVATEMESSAGE`
`static int` | `REFRESHLIMIT`
`static int` | `REFRESHMODEL`
`static java.lang.String` | `REGISTRATION`
`static java.util.Hashtable` | `RESOURCES`
`static char` | `SEPARATOR` File separator
`static java.lang.String` | `SYSTEMEMAIL`
`static java.lang.String` | `SYSTEMLOGIN`
`static java.lang.String` | `SYSTEMPASSWORD`
`static int` | `TIMEOUT`
`static java.lang.String` | `TRANSCRIPT`
`static Dump` | `TRANSCRIPTIMPL`
`static java.lang.String` | `USERSESSIONID`
`static java.lang.String` | `XMLUSERS`

Method Summary
`static void` | `addModerator(java.lang.String name, java.lang.String password, java.lang.String email)` Adds or updates moderator.
`static void` | `appendLanguage(java.lang.String name, java.lang.String resource)` Adds or updates language.
`static void` | `appendModerator(java.lang.String name, java.lang.String password, java.lang.String email)` Adds or updates moderator.
`static void` | `ChatroomManagerToFile(ChatroomManager data, java.lang.String aFile)` Writes serialized Hashtable to file.
`static ChatroomManager` | `fileToChatroomManager(java.lang.String aFile)` Reads a serialized Hashtable from file.
`static InternalUser` | `getModerator(java.lang.String name)` Returns moderator.
`XMLPropertyResourceBundle` | `getResource(java.lang.String id)` Return resources given an id.
`static void` | `init(java.lang.String configFile)` XMLConfig initialization.
`static java.lang.String` | `readRegistration()` Converts OXW file into PLAIN text.
`static void` | `removeModerator(java.lang.String name)` Removes moderator.
`static void` | `writeConfig()` Saves XML file.
`static void` | `writeXMLUsers()` Saves XML Users file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BACKUPFILE

    public static java.lang.String BACKUPFILE

### BACKUPFILENAME

    public static java.lang.String BACKUPFILENAME

### AUTOCONFIG

    public static java.lang.String AUTOCONFIG

### LOGFOLDER

    public static java.lang.String LOGFOLDER

### SYSTEMLOGIN

    public static java.lang.String SYSTEMLOGIN

### SYSTEMPASSWORD

    public static java.lang.String SYSTEMPASSWORD

### SYSTEMEMAIL

    public static java.lang.String SYSTEMEMAIL

### XMLUSERS

    public static java.lang.String XMLUSERS

### TIMEOUT

    public static int TIMEOUT

### COOKIEID

    public static java.lang.String COOKIEID

### LICENSE

    public static java.lang.String LICENSE

### TRANSCRIPT

    public static java.lang.String TRANSCRIPT

### REGISTRATION

    public static java.lang.String REGISTRATION

### USERSESSIONID

    public static java.lang.String USERSESSIONID

### MESSAGESESSIONID

    public static java.lang.String MESSAGESESSIONID

### MAXUSERS

    public static int MAXUSERS

### HISTORY

    public static int HISTORY

### REFRESHLIMIT

    public static int REFRESHLIMIT

### DISPLAYMODE

    public static int DISPLAYMODE

### REFRESHMODEL

    public static int REFRESHMODEL

### PRIVATEMESSAGE

    public static boolean PRIVATEMESSAGE

### SEPARATOR

    public static char SEPARATOR

  File separator

### LINESEPARATOR

    public static java.lang.String LINESEPARATOR

  Line separator

### CONFFOLDER

    public static java.lang.String CONFFOLDER

  Path to jChatBox conf folder (Not ending with a separator)

### FILTERSCLASSES

    public static java.util.Vector FILTERSCLASSES

### FILTERS

    public static java.util.Vector FILTERS

### LISTENERSCLASSES

    public static java.util.Vector LISTENERSCLASSES

### LISTENERS

    public static java.util.Vector LISTENERS

### TRANSCRIPTIMPL

    public static Dump TRANSCRIPTIMPL

### MODERATORS

    public static java.util.Hashtable MODERATORS

### _XMLUsersfilename

    public static java.lang.String _XMLUsersfilename

### LANGUAGES

    public static java.util.Hashtable LANGUAGES

### DEFAULTLANGUAGE

    public static java.lang.String DEFAULTLANGUAGE

### RESOURCES

    public static java.util.Hashtable RESOURCES

### CONTEXT

    public static java.lang.Object CONTEXT

### _XMLfilename

    public static java.lang.String _XMLfilename

Method Detail

### init

    public static void init(java.lang.String configFile)

  XMLConfig initialization.
  Set OS file separator.
  Set XML config filename.
  Read & parse XML config file
  Set filters list.

### getResource

    public XMLPropertyResourceBundle getResource(java.lang.String id)

  Return resources given an id.

### readRegistration

    public static java.lang.String readRegistration()

  Converts OXW file into PLAIN text.

### appendLanguage

    public static void appendLanguage(java.lang.String name,
                                      java.lang.String resource)

  Adds or updates language. Not persited.

### appendModerator

    public static void appendModerator(java.lang.String name,
                                       java.lang.String password,
                                       java.lang.String email)

  Adds or updates moderator. Not persited.

### addModerator

    public static void addModerator(java.lang.String name,
                                    java.lang.String password,
                                    java.lang.String email)

  Adds or updates moderator. Persisted.

### getModerator

    public static InternalUser getModerator(java.lang.String name)

  Returns moderator.

### removeModerator

    public static void removeModerator(java.lang.String name)

  Removes moderator. Persisted.

### writeConfig

    public static void writeConfig()
                            throws java.lang.Exception

  Saves XML file.

    `java.lang.Exception`

### writeXMLUsers

    public static void writeXMLUsers()

  Saves XML Users file.

### ChatroomManagerToFile

    public static void ChatroomManagerToFile(ChatroomManager data,
                                             java.lang.String aFile)

  Writes serialized Hashtable to file.

### fileToChatroomManager

    public static ChatroomManager fileToChatroomManager(java.lang.String aFile)

  Reads a serialized Hashtable from file.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD