Class ControlConfigurationSaxHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.torque.generator.configuration.controller.ControlConfigurationSaxHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Reads the controller configuration from the controller configuration file.
-
Constructor Summary
ConstructorsConstructorDescriptionControlConfigurationSaxHandler(ControlConfiguration controllerConfiguration, ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Receive notification of character data inside an element.voidendElement(String uri, String localName, String rawName) voiderror(SAXParseException exception) voidfatalError(SAXParseException exception) resolveEntity(String publicId, String systemId) EntityResolver implementation.voidstartElement(String uri, String localName, String qName, Attributes attributes) voidwarning(SAXParseException exception) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
Receive notification of character data inside an element.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- 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:
-
resolveEntity
EntityResolver implementation. Called by the XML parser- Specified by:
resolveEntityin interfaceEntityResolver- Overrides:
resolveEntityin classDefaultHandler- 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:
SAXExceptionIOException- See Also:
-
error
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler- Throws:
SAXParseException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Overrides:
fatalErrorin classDefaultHandler- Throws:
SAXParseException
-
warning
- Specified by:
warningin interfaceErrorHandler- Overrides:
warningin classDefaultHandler- Throws:
SAXParseException
-