|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.talika.tarsis.context.XmlConfigHandler
public final class XmlConfigHandler
Loads context configuration from an XML file.
Field Summary | |
---|---|
static java.lang.String |
AUTH_PARAM_TAG
<auth-param> tag. |
static java.lang.String |
AUTHC_TAG
<authenticator> tag. |
static java.lang.String |
AUTHZ_TAG
<authorizator> tag. |
static java.lang.String |
CLASS_NAME_ATTR
Class name attribute. |
static java.lang.String |
CMD_FACTORY_PARAM_TAG
<command-factory-param> tag. |
static java.lang.String |
CMD_FACTORY_TAG
<command-factory> tag. |
static java.lang.String |
CONFIG_TAG
<tarsis-config> tag. |
static java.lang.String |
DEBUG_VALUE
Debug log level value. |
static java.lang.String |
DTD_CLASSPATH
DTD class path. |
static java.lang.String |
DTD_PUBLICID
DTD public id. |
static java.lang.String |
ERROR_VALUE
Error log level value. |
static java.lang.String |
FACTORY_PARAM_TAG
<factory-param> tag. |
static java.lang.String |
FACTORY_TAG
<factory> tag. |
static java.lang.String |
INFO_VALUE
Info log level value. |
static java.lang.String |
INIT_PARAM_TAG
<init-param> tag. |
static java.lang.String |
LOG_LVL_ATTR
Log level attribute. |
static java.lang.String |
LOG_PARAM_TAG
<log-param> tag. |
static java.lang.String |
LOG_TAG
<log> tag. |
static java.lang.String |
NAME_ATTR
Name attribute. |
static java.lang.String |
PANIC_VALUE
Panic log level value. |
static java.lang.String |
PRELOAD_ATTR
Preload attribute. |
static java.lang.String |
SECURITY_TAG
<security> tag. |
static java.lang.String |
VALUE_ATTR
Value attribute. |
static java.lang.String |
WARNING_VALUE
Warning log level value. |
Constructor Summary | |
---|---|
XmlConfigHandler()
Creates a new XmlConfigHandler object. |
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. |
AuthenticatorService |
getAuthenticathor()
Returns parsed Authenticator instance. |
AuthorizatorService |
getAuthorizator()
Returns parsed Authorizator instance. |
CommandFactoryService |
getCommandFactory()
Returns parsed CommandFactory instance. |
java.util.Map |
getFactories()
Returns parsed Factory isntances map. |
java.util.Map |
getInitParameters()
Returns parsed init parameters map. |
java.util.Collection |
getLoggers()
Returns parsed Logger instances list. |
protected void |
processAuthenticatorTag(org.xml.sax.Attributes atts)
Process <authenticator> tag. |
protected void |
processAuthorizatorTag(org.xml.sax.Attributes atts)
Process <authorizator> tag. |
protected void |
processCommandFactoryTag(org.xml.sax.Attributes atts)
Process <command-factory> tag. |
protected void |
processFactoryTag(org.xml.sax.Attributes atts)
Process <factory> tag. |
protected void |
processInitParamTag(org.xml.sax.Attributes atts)
Process <init-param> tag. |
protected void |
processLogTag(org.xml.sax.Attributes atts)
Process <log> tag. |
protected void |
processParamTag(org.xml.sax.Attributes atts)
Process <XXXX-param> tags. |
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 CONFIG_TAG
public static final java.lang.String INIT_PARAM_TAG
public static final java.lang.String SECURITY_TAG
public static final java.lang.String AUTHC_TAG
public static final java.lang.String AUTHZ_TAG
public static final java.lang.String AUTH_PARAM_TAG
public static final java.lang.String LOG_TAG
public static final java.lang.String LOG_PARAM_TAG
public static final java.lang.String FACTORY_TAG
public static final java.lang.String FACTORY_PARAM_TAG
public static final java.lang.String CMD_FACTORY_TAG
public static final java.lang.String CMD_FACTORY_PARAM_TAG
public static final java.lang.String NAME_ATTR
public static final java.lang.String CLASS_NAME_ATTR
public static final java.lang.String VALUE_ATTR
public static final java.lang.String LOG_LVL_ATTR
public static final java.lang.String PRELOAD_ATTR
public static final java.lang.String DEBUG_VALUE
public static final java.lang.String INFO_VALUE
public static final java.lang.String WARNING_VALUE
public static final java.lang.String ERROR_VALUE
public static final java.lang.String PANIC_VALUE
public static final java.lang.String DTD_PUBLICID
public static final java.lang.String DTD_CLASSPATH
Constructor Detail |
---|
public XmlConfigHandler()
XmlConfigHandler
object.
Method Detail |
---|
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.ContentHandler.startDocument()
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
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
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
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
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
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)
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
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
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
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
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
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
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
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 getInitParameters()
public java.util.Collection getLoggers()
Logger
instances list.
Logger
instances list.public AuthenticatorService getAuthenticathor()
Authenticator
instance.
Authenticator
instance or
null
if none have been parsed.public AuthorizatorService getAuthorizator()
Authorizator
instance.
AuthorizatorService
instance
or null
if non hava been parsed.public java.util.Map getFactories()
Factory
isntances map.
Factory
isntances map.public CommandFactoryService getCommandFactory()
CommandFactory
instance.
CommandFactory
instance.protected void processInitParamTag(org.xml.sax.Attributes atts)
atts
- Attributes tag attributes.protected void processAuthenticatorTag(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 void processAuthorizatorTag(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 void processLogTag(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 void processFactoryTag(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 void processCommandFactoryTag(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 void processParamTag(org.xml.sax.Attributes atts)
atts
- Attributes tag attributes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |