org.cofax
Class XMLConfig

java.lang.Object
  |
  +--org.cofax.XMLConfig

public class XMLConfig
extends java.lang.Object

Settings for CofaxServlet are stored in an XML data store accessible via this module.

Version:
1.5
Author:
Rajiv Pant, Karl Martino, Sam Cohen

Constructor Summary
XMLConfig()
          Class Constructor, perform initializations
 
Method Summary
 void empty()
          Clears out all of the hash table contents
 java.lang.Object get(java.lang.String fieldName)
          Returns a member of the internal hash as an object of its own type
 java.lang.String getLastError()
          Returns the last error recorderd by XMLConfig
 java.util.ArrayList getList(java.lang.String listName)
          Returns a list of key-value pairs (HashMaps) For example:
front_page
20
will produce a list containing: key value --- ----- map:section front_page map:rank 20
 java.lang.String getString(java.lang.String fieldName)
          Returns a member of the internal hash as a string
 boolean load()
          To load data from an XML file and into the config structure
 void refresh()
          Clears out all of the hash table contents
 boolean set(java.lang.String fieldName, java.lang.Object fieldValue)
          Inserts a tag and value pair from XML into the config structure
 void setXMLFileName(java.lang.String xmlFileName)
          Set's the XMLFileName field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfig

public XMLConfig()
Class Constructor, perform initializations
Method Detail

getLastError

public java.lang.String getLastError()
Returns the last error recorderd by XMLConfig

setXMLFileName

public void setXMLFileName(java.lang.String xmlFileName)
Set's the XMLFileName field

empty

public void empty()
Clears out all of the hash table contents

refresh

public void refresh()
Clears out all of the hash table contents

set

public boolean set(java.lang.String fieldName,
                   java.lang.Object fieldValue)
Inserts a tag and value pair from XML into the config structure

get

public java.lang.Object get(java.lang.String fieldName)
Returns a member of the internal hash as an object of its own type

getString

public java.lang.String getString(java.lang.String fieldName)
Returns a member of the internal hash as a string

load

public boolean load()
To load data from an XML file and into the config structure

getList

public java.util.ArrayList getList(java.lang.String listName)
Returns a list of key-value pairs (HashMaps) For example:
front_page
20
will produce a list containing: key value --- ----- map:section front_page map:rank 20


Copyright 2001 KnightRidder.com. All Rights Reserved.