Class LoginsFileParser
- java.lang.Object
-
- com.caplin.motif.fx.ret.common.extension.usermanager.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.
-
-
Constructor Summary
Constructors Constructor Description LoginsFileParser(ImmutableUserMappingCache.Builder builder, java.lang.Class delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] chars, int i, int i1)
void
endDocument()
void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
void
endPrefixMapping(java.lang.String s)
void
ignorableWhitespace(char[] chars, int i, int i1)
void
load(java.lang.String path)
Loads the XML file at the given path.void
log(java.lang.String format, java.lang.Object... arguments)
void
processingInstruction(java.lang.String s, java.lang.String s1)
void
setDocumentLocator(org.xml.sax.Locator locator)
void
skippedEntity(java.lang.String s)
void
startDocument()
void
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
void
startPrefixMapping(java.lang.String s, java.lang.String s1)
-
-
-
Constructor Detail
-
LoginsFileParser
public LoginsFileParser(ImmutableUserMappingCache.Builder builder, java.lang.Class delegate)
-
-
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 createdorg.xml.sax.SAXException
- if any SAX errors occur during processingjava.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 interfaceorg.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 interfaceorg.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
- Specified by:
endDocument
in interfaceorg.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 interfaceorg.xml.sax.ContentHandler
-
startPrefixMapping
public void startPrefixMapping(java.lang.String s, java.lang.String s1) throws org.xml.sax.SAXException
- Specified by:
startPrefixMapping
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
-
-