|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.talika.tarsis.security.memory.XmlUsersHandler
Implementation of SAX handlers for Tarsis MVC Users XML files.
| Field Summary | |
|---|---|
static java.lang.String |
DTD_CLASSPATH
DTD class path. |
static java.lang.String |
DTD_PUBLICID
DTD public id. |
static java.lang.String |
NAME_ATTR
Name attribute. |
static java.lang.String |
PASSWORD_ATTR
Password attribute. |
static java.lang.String |
ROLES_ATTR
Roles attribute. |
static java.lang.String |
ROLES_SEPARATOR
Roles separator. |
static java.lang.String |
USER_TAG
<user> tag. |
static java.lang.String |
USERS_TAG
<tarsis-users> tag. |
| Constructor Summary | |
|---|---|
XmlUsersHandler()
Creates a new XmlUsersHandler. |
|
| Method Summary | |
|---|---|
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name)
Receive notification of the end of an element. |
void |
error(org.xml.sax.SAXParseException spe)
Receive notification of a recoverable error. |
void |
fatalError(org.xml.sax.SAXParseException spe)
Receive notification of a non-recoverable error. |
java.util.Map |
getUsers()
Returns parsed users map. |
protected java.util.Set |
parseRoles(java.lang.String rolesStr)
Returns a Set of roles parsed from string. |
protected void |
processUserTag(org.xml.sax.Attributes atts)
Process <user> tag. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Allow the application to resolve external entities. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
Receive notification of the beginning of an element. |
void |
warning(org.xml.sax.SAXParseException spe)
Receive notification of a warning. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
characters, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String USERS_TAG
public static final java.lang.String USER_TAG
public static final java.lang.String NAME_ATTR
public static final java.lang.String PASSWORD_ATTR
public static final java.lang.String ROLES_ATTR
public static final java.lang.String ROLES_SEPARATOR
public static final java.lang.String DTD_PUBLICID
public static final java.lang.String DTD_CLASSPATH
| Constructor Detail |
public XmlUsersHandler()
XmlUsersHandler.
| Method Detail |
public void startDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ContentHandler.startDocument()
public void endDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ContentHandler.endDocument()
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
namespaceURI - String The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace processing is not being performed.localName - String The local name (without prefix), or the empty string
if Namespace processing is not being performed.name - String The qualified name (with prefix), or the empty string if
qualified names are not available.atts - Attributes The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ContentHandler.startElement(String, String, String, Attributes)
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name)
throws org.xml.sax.SAXException
namespaceURI - String The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace processing is not being performed.localName - String The local name (without prefix), or the empty string
if Namespace processing is not being performed.name - String The qualified name (with prefix), or the empty string if
qualified names are not available.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ContentHandler.endElement(String, String, String)
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
publicId - String The public identifier of the external entity being
referenced, or null if none was supplied.systemId - String The system identifier of the external entity being
referenced.
InputStream or Reader for the
InputSource.EntityResolver.resolveEntity(String, String)
public void warning(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
spe - SAXParseException The warning information encapsulated in a SAX
parse exception.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ErrorHandler.warning(SAXParseException)
public void error(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
spe - SAXParseException The error information encapsulated in a SAX parse
exception.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ErrorHandler.error(SAXParseException)
public void fatalError(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
spe - SAXParseException The error information encapsulated in a SAX parse
exception.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.ErrorHandler.fatalError(SAXParseException)public java.util.Map getUsers()
protected void processUserTag(org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
atts - Attributes tag attributes.
org.xml.sax.SAXException - if there is an error while processing tag.protected java.util.Set parseRoles(java.lang.String rolesStr)
Set of roles parsed from string.
rolesStr - String string to be parsed.
Set of roles parsed from string.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||