Class ConfigurationLoader.InternalLoader

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
    Enclosing class:
    ConfigurationLoader

    private final class ConfigurationLoader.InternalLoader
    extends XmlLoader
    Implements the SAX document handler interfaces, so they do not appear in the public API of the ConfigurationLoader.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Deque<DefaultConfiguration> configStack
      The loaded configurations.
      private Configuration configuration
      The Configuration that is being built.
      private static java.lang.String DEFAULT
      Default attribute.
      private static java.lang.String KEY
      Name of the key attribute.
      private static java.lang.String MESSAGE
      Name of the message element.
      private static java.lang.String METADATA
      Name of the message element.
      private static java.lang.String MODULE
      Module elements.
      private static java.lang.String NAME
      Name attribute.
      private static java.lang.String PROPERTY
      Property element.
      private static java.lang.String SEVERITY
      Name of the severity property.
      private static java.lang.String VALUE
      Value attribute.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private InternalLoader()
      Creates a new InternalLoader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean containsAttribute​(Configuration module, java.lang.String attributeName)
      Util method to recheck attribute in module.
      void endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName)  
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalLoader

        private InternalLoader()
                        throws org.xml.sax.SAXException,
                               javax.xml.parsers.ParserConfigurationException
        Creates a new InternalLoader.
        Throws:
        org.xml.sax.SAXException - if an error occurs
        javax.xml.parsers.ParserConfigurationException - if an error occurs
    • Method Detail

      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attributes)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qName)
                        throws org.xml.sax.SAXException
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • containsAttribute

        private boolean containsAttribute​(Configuration module,
                                          java.lang.String attributeName)
        Util method to recheck attribute in module.
        Parameters:
        module - module to check
        attributeName - name of attribute in module to find
        Returns:
        true if attribute is present in module