public class XmlRenderingConfiguration
extends java.lang.Object
Do not change this object after you have added it to the
Engine
. It's in principle
an immutable object, but to prevent too many constructor parameters and
later backward compatibility problems, you have to specify the options with
setter methods, rather than with constructor arguments.
You must set a non-null
template
or set
copy
to true
. All other options are optional.
Constructor and Description |
---|
XmlRenderingConfiguration()
Creates new object.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocumentElement(java.lang.String xmlns,
java.lang.String localName)
Adds an element to the list of document elements.
|
void |
addLocalDataBuilder(LocalDataBuilder localDataBuilder)
Adds an extra local data builder that is invoked after all other
local data builders.
|
void |
addSourcePathPattern(java.lang.String pathPattern)
Adds a path to the list of source path patterns.
|
void |
addXmlDataLoaderOption(java.lang.String name,
java.lang.Object value)
Adds or replaces an option in the map of xml data loader
options.
|
void |
clearDocumentElements()
Empties the document element list.
|
void |
clearLocalDataBuilders()
Removes all local data builders.
|
void |
clearSourcePathPatterns()
Empties the list of source path patterns.
|
void |
clearXmlDataLoaderOptions()
Removes all xml data loader options.
|
void |
setCopy(boolean copy)
Sets if the XML file should be copied as is, or renderd with a template.
|
void |
setTemplate(java.lang.String template)
Sets the renderer template.
|
java.lang.String |
toString() |
public void setTemplate(java.lang.String template)
template
- the source path of the template used for the
rendering of the XML file. Can't be null
.public void setCopy(boolean copy)
true
, then the value of the
template
option is insignificant.public void addDocumentElement(java.lang.String xmlns, java.lang.String localName)
xmlns
- the name-space URL of the element. This should be
null
or 0-length stirng if the element doesn't belong to
any XML name-space.localName
- the local (name-space preixless) name of the element.public void clearDocumentElements()
addDocumentElement(String, String)
public void addLocalDataBuilder(LocalDataBuilder localDataBuilder)
The data loaders added earlier will be executed earlier. The data loader executed later can replace earlier added local data variables.
public void clearLocalDataBuilders()
addLocalDataBuilder(LocalDataBuilder)
public void addSourcePathPattern(java.lang.String pathPattern)
pathPattern
- the path pattern of the source root relative path of
the XML file. It doesn't mater if it starts with / or not.public void clearSourcePathPatterns()
addSourcePathPattern(String)
public void addXmlDataLoaderOption(java.lang.String name, java.lang.Object value)
"namespaceAware"
option, for which false
value is not allowed.name
- the name of the option. Option "namespaceAware"
is not allowed.value
- the value of the optionpublic void clearXmlDataLoaderOptions()
public java.lang.String toString()
toString
in class java.lang.Object