Package org.apache.torque.generator.configuration.controller

# Class ControlConfigurationSaxHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.torque.generator.configuration.controller.ControlConfigurationSaxHandler

All Implemented Interfaces:
  `ContentHandler`, `DTDHandler`, `EntityResolver`, `ErrorHandler`

public class ControlConfigurationSaxHandler extends DefaultHandler
Reads the controller configuration from the controller configuration file.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ControlConfigurationSaxHandler(ControlConfiguration controllerConfiguration, ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `characters(char[] ch, int start, int length)`
  Receive notification of character data inside an element.
  `void`
  `endElement(String uri, String localName, String rawName)`
  `void`
  `error(SAXParseException exception)`
  `void`
  `fatalError(SAXParseException exception)`
  `InputSource`
  `resolveEntity(String publicId, String systemId)`
  EntityResolver implementation.
  `void`
  `startElement(String uri, String localName, String qName, Attributes attributes)`
  `void`
  `warning(SAXParseException exception)`

  ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

  `endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.xml.sax.ContentHandler

  `declaration`

- ## Constructor Details

  - ### ControlConfigurationSaxHandler

    public ControlConfigurationSaxHandler(ControlConfiguration controllerConfiguration, ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)
    Constructor.
    Parameters:
      `controllerConfiguration` - the configuration object to fill, no null.
      `configurationProvider` - the Object for accessing the configuration, not null.
      `unitDescriptor` - The description of the generation unit, not null.
      `configurationHandlers` - the available configuration handlers, not null.
    Throws:
      `NullPointerException` - if an argument is null.

- ## Method Details

  - ### startElement

    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
    Specified by:
      `startElement` in interface `ContentHandler`
    Overrides:
      `startElement` in class `DefaultHandler`
    Throws:
      `SAXException`

  - ### endElement

    public void endElement(String uri, String localName, String rawName) throws SAXException
    Specified by:
      `endElement` in interface `ContentHandler`
    Overrides:
      `endElement` in class `DefaultHandler`
    Throws:
      `SAXException`

  - ### characters

    public void characters(char[] ch, int start, int length) throws SAXException
    Receive notification of character data inside an element.
    Specified by:
      `characters` in interface `ContentHandler`
    Overrides:
      `characters` in class `DefaultHandler`
    Parameters:
      `ch` - The characters.
      `start` - The start position in the character array.
      `length` - The number of characters to use from the character array.
    Throws:
      `SAXException` - Any SAX exception, possibly wrapping another exception.
    See Also:
      - `ContentHandler.characters(char[], int, int)`

  - ### resolveEntity

    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
    EntityResolver implementation. Called by the XML parser
    Specified by:
      `resolveEntity` in interface `EntityResolver`
    Overrides:
      `resolveEntity` in class `DefaultHandler`
    Parameters:
      `publicId` - The public identifier of the external entity.
      `systemId` - The system identifier of the external entity.
    Returns:
      an InputSource for the entity, or null if the URI is not known.
    Throws:
      `SAXException`
      `IOException`
    See Also:
      - `ConfigurationEntityResolver.resolveEntity(String, String)`

  - ### error

    public void error(SAXParseException exception) throws SAXParseException
    Specified by:
      `error` in interface `ErrorHandler`
    Overrides:
      `error` in class `DefaultHandler`
    Throws:
      `SAXParseException`

  - ### fatalError

    public void fatalError(SAXParseException exception) throws SAXParseException
    Specified by:
      `fatalError` in interface `ErrorHandler`
    Overrides:
      `fatalError` in class `DefaultHandler`
    Throws:
      `SAXParseException`

  - ### warning

    public void warning(SAXParseException exception) throws SAXParseException
    Specified by:
      `warning` in interface `ErrorHandler`
    Overrides:
      `warning` in class `DefaultHandler`
    Throws:
      `SAXParseException`