File: generic.xml

package info (click to toggle)
velocity-tools 2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,864 kB
  • sloc: java: 24,410; xml: 7,944; jsp: 459; makefile: 20
file content (125 lines) | stat: -rw-r--r-- 6,107 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>

<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  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>Overview</title>
        <projectfile>xdocs/project.xml</projectfile>
        <subprojectfile>xdocs/generic.project.xml</subprojectfile>
    </properties>

    <body>

    <section name="Overview">
        <p>
            GenericTools is the set of classes that provide basic 
            infrastructure for using tools in standard Java SE Velocity 
            projects, as well as a set of tools for use in generic Velocity 
            templates. These tools have no Java EE dependencies and are often 
            safe to use as "singletons".  Some of them are not thread-safe to 
            allow both a no-arg constructor and configurability, but the 
            state-changing methods are declared protected with the exception 
            of configure(Map) which is--by default--rendered useless after 
            being used just once.  If you require strict thread-safety, 
            be cautious in using any configurable tools and consider
            <a href="http://wiki.apache.org/velocity/BuildingSecureWebApplications">restricting
            the abilities of template authors</a> to prevent circumvention
            of the lockdown placed on configuration methods.
        </p>
    </section>

    <section name="Default Configuration">
        <p>
            The default configuration provided for GenericTools is 
            <a href="http://svn.apache.org/viewvc/velocity/tools/trunk/src/main/java/org/apache/velocity/tools/generic/tools.xml?view=markup">
            here</a>.  It includes all of the tools listed
            <a href="generic.html#Tools">below</a>.
        </p>
    </section>

    <section name="Dependencies">
        <p>
        The dependencies required for GenericTools vary somewhat depending on which
        tools you use, whether you will rely on core tool management infrastructure,
        and if so, how you choose to configure your toolbox.  More details can be found
        on the
        <a href="dependencies.html#GenericTools">dependencies chart</a>.
        </p>
    </section>
    <section name="Tools">
        <ul>
        <li><javadoc package="generic" name="AlternatorTool"/>
            - For creating <javadoc package="generic" name="Alternator"/>s
            to easily alternate over a set of values.</li>
        <li><javadoc package="generic" name="ClassTool"/>
            - For simplifying reflective lookup of information about
            Classes and their fields, methods and constructors.</li>
        <li><javadoc package="generic" name="ContextTool"/>
             - For convenient access to Context data and meta-data.</li>
        <li><javadoc package="generic" name="ConversionTool"/>
            - For converting String values to richer object types.</li>
        <li><javadoc package="generic" name="DateTool"/>
            &amp;
            <javadoc package="generic" name="ComparisonDateTool"/>
            - For manipulating, formatting, and comparing dates.</li>
        <li><javadoc package="generic" name="DisplayTool"/>
            - For controlling display of references (e.g. truncating values,
            "pretty printing" lists, and displaying alternates when a reference is null).</li>
        <li><javadoc package="generic" name="EscapeTool"/>
            - For common escaping needs in Velocity templates (e.g. escaping
            html, xml, javascript etc.)</li>
        <li><javadoc package="generic" name="FieldTool"/>
            - For (easy) access to static fields in a class, such as string
            constants.</li>
        <li><javadoc package="generic" name="LoopTool"/>
            - A convenience tool to use with #foreach loops. It wraps a list
            with a custom iterator to provide greater control, allowing loops
            to end early, skip ahead and more.</li>
        <li><javadoc package="generic" name="LinkTool"/>
            - For creating and manipulating URIs and URLs. The API for this tool is
            designed to closely resemble that of the VelocityView tool of the same name.</li>
        <li><javadoc package="generic" name="ListTool"/>
            - For working with arrays and lists, treats both transparently
            the same.</li>
        <li><javadoc package="generic" name="MathTool"/>
            - For performing math functions.</li>
        <li><javadoc package="generic" name="NumberTool"/>
            - For formatting and converting numbers.</li>
        <li><javadoc package="generic" name="RenderTool"/>
            - To evaluate and render arbitrary strings of VTL, including
            recursive rendering.</li>
        <li><javadoc package="generic" name="ResourceTool"/>
            - For simplified access to ResourceBundles for
            internationalization or other dynamic content needs.</li>
        <li><javadoc package="generic" name="SortTool"/>
            - Used to sort collections (or arrays, iterators, etc) on
            any arbitary set of properties exposed by the objects contained
            within the collection.</li>
        <li><javadoc package="generic" name="XmlTool"/>
            - For reading/navigating XML files.  This uses dom4j under the
            covers and provides complete XPath support.</li>
        </ul>
    </section>

    </body>

</document>