Package org.apache.torque.generator.configuration.outlet

# Klasse OutletConfigurationSaxHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.torque.generator.configuration.outlet.OutletConfigurationSaxHandler

Alle implementierten Schnittstellen:
  `ContentHandler`, `DTDHandler`, `EntityResolver`, `ErrorHandler`

public class OutletConfigurationSaxHandler extends DefaultHandler
A SAX handler which parses Outlet configuration files. Relies on delegate handlers for parsing the configuration for the different outlet types.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `OutletConfigurationSaxHandler(ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `void`
  `characters(char[] ch, int start, int length)`
  `void`
  `endElement(String uri, String localName, String rawName)`
  `void`
  `error(SAXParseException exception)`
  `void`
  `fatalError(SAXParseException exception)`
  `List<MergepointMapping>`
  `getMergepointMappings()`
  Returns all mergepoint mappings which were configured outside the outlets in the parsed outlet configuration file.
  `OutletSaxHandler`
  `getOutletHandler(QualifiedName outletName, String outletType)`
  Returns the correct handler for a outlet tag.
  `List<Outlet>`
  `getOutlets()`
  Returns all outlets which were configured in the parsed outlet configuration file.
  `static String`
  `getOutletType(Attributes attributes)`
  Reads the outlet type from the attributes of the outlet XML tag.
  `InputSource`
  `resolveEntity(String publicId, String systemId)`
  EntityResolver implementation.
  `void`
  `startElement(String uri, String localName, String qName, Attributes attributes)`
  `void`
  `warning(SAXParseException exception)`

  ### Von Klasse geerbte Methoden org.xml.sax.helpers.DefaultHandler

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

  ### Von Klasse geerbte Methoden java.lang.Object

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

  ### Von Schnittstelle geerbte Methoden org.xml.sax.ContentHandler

  `declaration`

- ## Konstruktordetails

  - ### OutletConfigurationSaxHandler

    public OutletConfigurationSaxHandler(ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)
    Constructor.
    Parameter:
      `configurationProvider` - The access object for the configuration files, not null.
      `unitDescriptor` - The description of the generation unit, not null.
      `configurationHandlers` - The available configuration handlers, not null.
    Löst aus:
      `NullPointerException` - if an argument is null.

- ## Methodendetails

  - ### getOutlets

    public List<Outlet> getOutlets()
    Returns all outlets which were configured in the parsed outlet configuration file.
    Gibt zurück:
      all created outlets, not null.

  - ### getMergepointMappings

    public List<MergepointMapping> getMergepointMappings()
    Returns all mergepoint mappings which were configured outside the outlets in the parsed outlet configuration file.
    Gibt zurück:
      all created mergepoint mappings, not null.

  - ### startElement

    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
    Angegeben von:
      `startElement` in Schnittstelle `ContentHandler`
    Setzt außer Kraft:
      `startElement` in Klasse `DefaultHandler`
    Löst aus:
      `SAXException`

  - ### endElement

    public void endElement(String uri, String localName, String rawName) throws SAXException
    Angegeben von:
      `endElement` in Schnittstelle `ContentHandler`
    Setzt außer Kraft:
      `endElement` in Klasse `DefaultHandler`
    Löst aus:
      `SAXException`

  - ### characters

    public void characters(char[] ch, int start, int length) throws SAXException
    Angegeben von:
      `characters` in Schnittstelle `ContentHandler`
    Setzt außer Kraft:
      `characters` in Klasse `DefaultHandler`
    Löst aus:
      `SAXException`

  - ### getOutletHandler

    public OutletSaxHandler getOutletHandler(QualifiedName outletName, String outletType) throws SAXException
    Returns the correct handler for a outlet tag. The method uses the type attribute to determine which handler is needed. I.e. it looks up the handler factory type in the outlet types, and asks the factory for a handler.
    Parameter:
      `outletName` - the name for the outlet which configuration will be read in by the generated SaxHandlerFactory, or null if the name of the outlet should be determined from the parsed XML.
      `outletType` - the type of the outlet, not null.
    Gibt zurück:
      the handler for the tag, not null.
    Löst aus:
      `SAXException` - if no matching handler can be identified, or if an error occurs while creating the handler.

  - ### getOutletType

    public static String getOutletType(Attributes attributes) throws SAXException
    Reads the outlet type from the attributes of the outlet XML tag.
    Parameter:
      `attributes` - the attributes of the XML tag, not null.
    Gibt zurück:
      the outlet type, not null.
    Löst aus:
      `SAXException` - if the xsi:type attribute is not set.

  - ### resolveEntity

    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
    EntityResolver implementation. Called by the XML parser
    Angegeben von:
      `resolveEntity` in Schnittstelle `EntityResolver`
    Setzt außer Kraft:
      `resolveEntity` in Klasse `DefaultHandler`
    Parameter:
      `publicId` - The public identifier of the external entity.
      `systemId` - The system identifier of the external entity.
    Gibt zurück:
      an InputSource for the entity, or null if the URI is not known.
    Löst aus:
      `SAXException`
      `IOException`
    Siehe auch:
      - `ConfigurationEntityResolver.resolveEntity(String, String)`

  - ### error

    public void error(SAXParseException exception) throws SAXParseException
    Angegeben von:
      `error` in Schnittstelle `ErrorHandler`
    Setzt außer Kraft:
      `error` in Klasse `DefaultHandler`
    Löst aus:
      `SAXParseException`

  - ### fatalError

    public void fatalError(SAXParseException exception) throws SAXParseException
    Angegeben von:
      `fatalError` in Schnittstelle `ErrorHandler`
    Setzt außer Kraft:
      `fatalError` in Klasse `DefaultHandler`
    Löst aus:
      `SAXParseException`

  - ### warning

    public void warning(SAXParseException exception) throws SAXParseException
    Angegeben von:
      `warning` in Schnittstelle `ErrorHandler`
    Setzt außer Kraft:
      `warning` in Klasse `DefaultHandler`
    Löst aus:
      `SAXParseException`