Class LoginsFileParser

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler

    public class LoginsFileParser
    extends java.lang.Object
    implements org.xml.sax.ContentHandler
    Parses a logins XML file and stores all users in a cache. - (shortlife) Will run during initialisation per adapter. - (fatal) If it fails, the adapter should probably stop. - (nonconcurrent) Concurrent access is not expected.
    • Method Detail

      • load

        public void load​(java.lang.String path)
                  throws javax.xml.parsers.ParserConfigurationException,
                         org.xml.sax.SAXException,
                         java.io.IOException
        Loads the XML file at the given path.
        Throws:
        javax.xml.parsers.ParserConfigurationException - if a parser cannot be created
        org.xml.sax.SAXException - if any SAX errors occur during processing
        java.io.IOException - if the XML cannot be parsed
      • 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
        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
        Throws:
        org.xml.sax.SAXException
      • startDocument

        public void startDocument()
                           throws org.xml.sax.SAXException
        Specified by:
        startDocument in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • log

        public void log​(java.lang.String format,
                        java.lang.Object... arguments)
      • setDocumentLocator

        public void setDocumentLocator​(org.xml.sax.Locator locator)
        Specified by:
        setDocumentLocator in interface org.xml.sax.ContentHandler
      • startPrefixMapping

        public void startPrefixMapping​(java.lang.String s,
                                       java.lang.String s1)
                                throws org.xml.sax.SAXException
        Specified by:
        startPrefixMapping in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • endPrefixMapping

        public void endPrefixMapping​(java.lang.String s)
                              throws org.xml.sax.SAXException
        Specified by:
        endPrefixMapping in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • characters

        public void characters​(char[] chars,
                               int i,
                               int i1)
                        throws org.xml.sax.SAXException
        Specified by:
        characters in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • ignorableWhitespace

        public void ignorableWhitespace​(char[] chars,
                                        int i,
                                        int i1)
                                 throws org.xml.sax.SAXException
        Specified by:
        ignorableWhitespace in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • processingInstruction

        public void processingInstruction​(java.lang.String s,
                                          java.lang.String s1)
                                   throws org.xml.sax.SAXException
        Specified by:
        processingInstruction in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • skippedEntity

        public void skippedEntity​(java.lang.String s)
                           throws org.xml.sax.SAXException
        Specified by:
        skippedEntity in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException