File: params.vm

package info (click to toggle)
velocity-tools 2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,952 kB
  • sloc: java: 24,414; xml: 7,944; jsp: 459; makefile: 24
file content (79 lines) | stat: -rw-r--r-- 5,437 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
## 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.
#title( 'ParameterTool' )
<p>
#set( $demo = $text.demo )
$demo.thisPage.insert("#doclink( 'ParameterTool' false )").
</p>

#demoTableStart()

#set( $quote = '"' )
#set( $desc = 'Convenience method for checking whether a certain parameter exists.' )
#demo1( 'params' 'exists' 6 $desc )

#set( $desc = 'Convenience method for use in Velocity templates. This is the same as $params.getString("foo"), but simplifies the syntax to $params.foo' )
#demo1( 'params' 'get' 6 $desc )

#set( $desc = 'Returns the parameter with the specified key, if it exists; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getString' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Boolean, if it exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getBoolean' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Number, if it exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getNumber' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Double, if it exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getDouble' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Integer, if it exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getInteger' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.util.Locale, if it exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getLocale' 6 $desc )
           
#set( $desc = 'Returns the parameter(s) with the specified key in an array of the type requested, if any exist; otherwise, returns <code>null</code>..' )
#demo1( 'params' 'getStrings' 6 $desc )
#set( $desc = 'Returns the parameter(s) with the specified key in an array of java.lang.Boolean objects, if any exist and can be converted to that type; otherwise, returns <code>null</code>..' )
#demo1( 'params' 'getBooleans' 6 $desc )
#set( $desc = 'Returns the parameter(s) with the specified key in an array of java.lang.Number objects, if any exist and can be converted to that type; otherwise, returns <code>null</code>..' )
#demo1( 'params' 'getNumbers' 6 $desc )
#set( $desc = 'Returns the parameter(s) with the specified key in an array of java.lang.Double objects, if any exist and can be converted to that type; otherwise, returns <code>null</code>..' )
#demo1( 'params' 'getDoubles' 6 $desc )
#set( $desc = 'Returns the parameter(s) with the specified key in an array of int primitives, if any exist and can be converted to that type; otherwise, returns <code>null</code>..' )
#demo1( 'params' 'getInts' 6 $desc )
#set( $desc = 'Returns the parameter(s) with the specified key in an array of java.util.Locale, if any exists and can be converted to that type; otherwise, returns <code>null</code>.' )
#demo1( 'params' 'getLocales' 6 $desc )
           
#set( $quote = '' )
#set( $desc = 'Returns the parameter with the specified key, if it exists; otherwise, returns the specified alternate value.' )
#demo2( 'params' 'getString' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang., if it exists; otherwise, returns the specified alternate Boolean.' )
#demo2( 'params' 'getBoolean' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Number, if it exists; otherwise, returns the specified alternate Number.' )
#demo2( 'params' 'getNumber' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Double, if it exists; otherwise, returns the specified alternate Double.' )
#demo2( 'params' 'getDouble' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.lang.Integer, if it exists; otherwise, returns the specified alternate Integer.' )
#demo2( 'params' 'getInteger' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as an int, if it exists; otherwise, returns the specified alternate int.' )
#demo2( 'params' 'getInt' 6 $desc )
#set( $desc = 'Returns the parameter with the specified key as a java.util.Locale, if it exists; otherwise, returns the specified alternate Locale.' )
#demo2( 'params' 'getLocale' 6 $desc )

#set( $desc = 'Returns the map of all parameters available for the current request.' )
#demo( 'params' 'all' $desc )
           
#set( $quote = '"' )
#demoCustom( 'params.layout' )
</table>