bill.util.persist
Class PersistConfiguration

java.lang.Object
  |
  +--bill.util.config.Configuration
        |
        +--bill.util.persist.PersistConfiguration

public class PersistConfiguration
extends Configuration

Extension of the Configuration class that holds a primitive index into the configuration data for use withconfiguration based persistance. From the section name of all the persistant data sections we extract the entity name and keep a list of these names. Associated with the name is a list of all the configuration sections for that entity name.


Fields inherited from class bill.util.config.Configuration
_currentSection, _fileName, _sectionNames, _sections, ENTRY_CONFLICT_APPEND, ENTRY_CONFLICT_DISCARD, ENTRY_CONFLICT_OVERWRITE, SECTION_CONFLICT_APPEND, SECTION_CONFLICT_DISCARD, SECTION_CONFLICT_INCLUDE, SECTION_CONFLICT_OVERWRITE
 
Constructor Summary
PersistConfiguration()
          Default creator, just sets our entity list information to an empty hashtable.
PersistConfiguration(String fileName)
          Class creator.
 
Method Summary
 void deleteConfigurationSection(ConfigurationSection section)
          Removes a configuration section to the index for that section.
 Vector getEntity(String entityName)
           
 void insertConfigurationSection(ConfigurationSection section)
          Adds a configuration section to the index for that section.
 
Methods inherited from class bill.util.config.Configuration
addSection, addSection, addSectionEntry, addSectionEntry, getEntryNames, getFileName, getNumberOfEntries, getNumberOfSections, getSection, getSection, getSectionConflictMode, getSectionEntry, getSectionEntry, getSectionEntryConflictMode, getSectionEntryQuantity, getSectionEntryQuantity, getSectionEntryValue, getSectionEntryValue, getSectionEntryValue, getSectionEntryValue, getSectionEntryValueAsInteger, getSectionEntryValueAsInteger, getSectionEntryValueAsInteger, getSectionEntryValueAsInteger, getSectionNames, getSectionQuantity, getSections, indexOf, indexOf, isSection, isSection, isSectionEntry, merge, mergeSections, mergeSections, mergeSections, mergeSections, removeSection, removeSection, removeSectionEntry, renameSection, save, setFileName, setSectionConflictMode, setSectionEntryConflictMode, setSectionEntryValue, swapSections, swapSections, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistConfiguration

public PersistConfiguration()
Default creator, just sets our entity list information to an empty hashtable.

PersistConfiguration

public PersistConfiguration(String fileName)
                     throws FileNotFoundException,
                            IOException,
                            ConfigurationException
Class creator. Initializes class variables and attempts to process the indicated configuration file. If the file cannot be opened or errors occur during reading, we throw the appropriate exception.
Parameters:
fileName - Name of the configuration file to process.
Throws:
FileNotFoundException - Indicates the file name passed in does not exist or cannot be accessed.
IOException - File was found but an error occurred while reading it.
ConfigurationException - A processing error was encountered while reading the configuration file, typically a syntax error.
Method Detail

insertConfigurationSection

public void insertConfigurationSection(ConfigurationSection section)
Adds a configuration section to the index for that section.
Parameters:
section - The configuration section being added.

deleteConfigurationSection

public void deleteConfigurationSection(ConfigurationSection section)
Removes a configuration section to the index for that section.
Parameters:
section - The configuration section being removed.

getEntity

public Vector getEntity(String entityName)