blob: 17f90288634960e071edfd9241611cfa50fd690d [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. The ASF licenses this file to You
under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<title>Customization</title>
</properties>
<body>
<section name="BeanFactory">
<p>
The BeanFactory is responsible of the creation and
lifecycle of beans. It can be a simple implementation or
it can be a wrapper of an IoC framework such as
Spring (included). <br/>
Traverser, ItemFilter, ItemComparator and
SizeCalculator instances are provided by this class
based on the ID. The beanFactory is accessed through a
JNDI address (see
<a href="configuration.html#BeanFactory">
configuration
</a>
).
</p>
</section>
<section name="Traverser">
<p>
The Traverser is a visitor which walks through the tree
and returns a Collection of nodes.
<br />
Included traversers are:
</p>
<ol>
<li>
<b>PreorderTraverser</b>
<br />
Preorder traverse strategy
</li>
<li>
<b>PostorderTraverser</b>
<br />
Postorder traverse strategy
</li>
<li>
<b>LevelByLevelTraverser</b>
<br />
Level by level traverse strategy
</li>
<li>
<b>AncestorsTraverser</b>
<br />
This implementation may be useful for displaying the
breadcrumb.
</li>
<li>
<b>ExpandedNodeTraverser</b>
<br />
This Traverser collects only the children of the
ancestors in the path from the root node to the
target node. It's useful for displaying a tree with
only one node expanded.
<br />
In order to work the target node must be provided as
a parameter (see traverserParam attribute in
<a href="tag-reference.html#nodes">jcr:nodes</a>
).
</li>
<li>
<b>ExpandedNodesTraverser</b>
<br />
This Traverser collects the children of the
ancestors in the path from the root node to any of
the target nodes. It's useful for displaying a tree
with many nodes expanded.
<br />
In order to work the target nodes must be provided
as a parameter (see traverserParam attribute in
<a href="tag-reference.html#nodes">jcr:nodes</a>
), a jstl expression referencing a Collection or
Iterator of Nodes.
</li>
</ol>
</section>
<section name="ItemFilter">
<p>
An ItemFilter implementation is responsible of
evaluating whether the given javax.jcr.Item should be
included based on the given expression (see filterExp
attribute in
<a href="tag-reference.html#nodes">jcr:nodes</a>
).
<br />
A JEXLItemFilter implementation is provided. It
evaluates any javax.jcr.Item based on a JEXL valid
expression which returns a Boolean instance. The
javax.jcr.Item to be evaluated is added to the
JEXLContext under the key "item". A valid JEXL
expression would be "item.name.equals('MyNodeName')".
</p>
</section>
<section name="ItemComparator">
<p>
An ItemComparator implementation is responsible of
handling comparison of any javax.jcr.Item based on the
given expression.
<br />
A JEXLItemComparator implementation is provided. It
compares any javax.jcr.Item based on a JEXL valid
expression which returns a comparable instance. The
javax.jcr.Item is added to the JEXLContext with the name
of "item". A valid JEXL expression would be "item.name".
</p>
</section>
<section name="TemplateEngine">
<p>
A TemplateEngine can be a simple template engine or can
be a wrapper of a powerful template engine such as
Velocity. It writes nodes and properties with the given
template to the given writer.
</p>
</section>
<section name="SizeCalculator">
<p>
A SizeCalculator implementation is responsible of
calculating the size that uses a given Node or Property.
</p>
</section>
</body>
</document>