java.lang.Objectorg.apache.tiles.definition.digester.DigesterDefinitionsReader
All Implemented Interfaces:
DefinitionsReader
Direct Known Subclasses:
CompatibilityDigesterDefinitionsReader
This DefinitionsReader
implementation expects the source to be
passed as an InputStream
. It parses XML data from the source
and builds a Map of Definition objects.
The Digester object can be configured by passing in initialization
parameters. Currently the only parameter that is supported is the
validating
parameter. This value is set to false
by default. To enable DTD validation for XML Definition files, give the init
method a parameter with a key of
org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE
and a value of "true"
.
The Definition objects are stored internally in a Map. The Map is stored as
an instance variable rather than a local variable in the read
method. This means that instances of this class are not
thread-safe and access by multiple threads must be synchronized.
$
- Rev: 788032 $ $Date: 2009-06-24 16:08:32 +0200 (mer, 24 giu 2009) $Nested Class Summary: | ||
---|---|---|
public static class | DigesterDefinitionsReader.FillDefinitionRule | Digester rule to manage definition filling. |
public static class | DigesterDefinitionsReader.FillAttributeRule | Digester rule to manage attribute filling. |
public static class | DigesterDefinitionsReader.PutAttributeRule | Digester rule to manage assignment of the attribute to the parent element. |
public class | DigesterDefinitionsReader.AddNestedDefinitionRule | Digester rule to manage assignment of a nested definition in an attribute value. |
Field Summary | ||
---|---|---|
public static final String | PARSER_VALIDATE_PARAMETER_NAME | Digester validation parameter name. |
protected static final String | DEFINITION_HANDLER_CLASS | The handler to create definitions.
|
protected static final String | PUT_ATTRIBUTE_HANDLER_CLASS | The handler to create attributes.
|
protected static final String | LIST_HANDLER_CLASS | The handler to create list attributes.
|
protected Digester | digester | Digester object used to read Definition data
from the source. |
protected boolean | validating | Should we use a validating XML parser to read the configuration file.
Default is true . |
protected String[] | registrations | The set of public identifiers, and corresponding resource names for the versions of the configuration file DTDs we know about. There MUST be an even number of Strings in this list! |
Method from org.apache.tiles.definition.digester.DigesterDefinitionsReader Summary: |
---|
addDefinition, getNextUniqueDefinitionName, getRegistrations, init, initSyntax, read |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.tiles.definition.digester.DigesterDefinitionsReader Detail: |
---|
Definition to the internal Map or replaces
an existing one. |
|
|
DefinitionsReader object.
This method must be called before the #read method is called. |
|
Definition objects from a source.
Implementations should publish what type of source object is expected. |