|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.dialog.basic.config.ConfigurationParser
public final class ConfigurationParser
Configuration utility for parsing configuration resources for defining dialogs. This class has no dependencies on web tier APIs, only on the parsing technology (Commons Digester) being used.
To use this utility, instantiate a new instance and set the
dialogs
, resource
, and validating
properties. Then, call the parse()
method. You can parse
more than one resource by resetting the resource
property and calling parse()
again.
Constructor Summary | |
---|---|
ConfigurationParser()
|
Method Summary | |
---|---|
Map |
getDialogs()
Return the Map of Dialog instances
into which parsed information will be stored, keyed by dialog
name. |
URL |
getResource()
Return the URL of the configuration resource to be parsed. |
boolean |
isValidating()
Return a flag indicating whether we will be doing a validating parse or not. |
void |
parse()
Parse the configuration resource identified by the resource
property, storing resulting information in the Map specified
by the dialogs property. |
void |
setDialogs(Map dialogs)
Set the Map of Dialog instances
into which parsed information will be stored, keyed by dialog
name. |
void |
setResource(URL resource)
Set the URL of the configuration resource to be parsed. |
void |
setValidating(boolean validating)
Set a flag indicating whether we will be doing a validating parse or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationParser()
Method Detail |
---|
public Map getDialogs()
Return the Map
of Dialog
instances
into which parsed information will be stored, keyed by dialog
name.
Dialog
s, keyed by namepublic void setDialogs(Map dialogs)
Set the Map
of Dialog
instances
into which parsed information will be stored, keyed by dialog
name.
dialogs
- The new mappublic URL getResource()
Return the URL of the configuration resource to be parsed.
public void setResource(URL resource)
Set the URL of the configuration resource to be parsed.
resource
- The new resource URLpublic boolean isValidating()
Return a flag indicating whether we will be doing a validating parse
or not. Default value is true
.
public void setValidating(boolean validating)
Set a flag indicating whether we will be doing a validating parse or not.
validating
- New flag valuepublic void parse() throws IOException, SAXException
Parse the configuration resource identified by the resource
property, storing resulting information in the Map
specified
by the dialogs
property.
IOException
- if an input/output error occurs
SAXException
- if an XML parsing error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |