Package freemarker.ext.jakarta.servlet
Class HttpRequestParametersHashModel
java.lang.Object
freemarker.ext.jakarta.servlet.HttpRequestParametersHashModel
- All Implemented Interfaces:
TemplateHashModel
,TemplateHashModelEx
,TemplateModel
TemplateHashModel wrapper for a HttpServletRequest parameters.
Note that this is for the legacy "javax" Servlet/JSP API; for Jakarta (that is, in modern Servlet containers), use
freemarker.ext.jakarta.servlet.HttpRequestParametersHashModel
instead (since 2.3.33).
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
ConstructorDescriptionHttpRequestParametersHashModel(jakarta.servlet.http.HttpServletRequest request)
-
Method Summary
-
Constructor Details
-
HttpRequestParametersHashModel
public HttpRequestParametersHashModel(jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
get
Description copied from interface:TemplateHashModel
Gets aTemplateModel
from the hash.- Specified by:
get
in interfaceTemplateHashModel
- Parameters:
key
- The name by which theTemplateModel
is identified in the template.- Returns:
- The
TemplateModel
referred to by the key, ornull
if not found.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceTemplateHashModel
-
size
public int size()- Specified by:
size
in interfaceTemplateHashModelEx
- Returns:
- the number of key/value mappings in the hash.
-
keys
- Specified by:
keys
in interfaceTemplateHashModelEx
- Returns:
- a collection containing the keys in the hash. Every element of
the returned collection must implement the
TemplateScalarModel
(as the keys of hashes are always strings).
-
values
- Specified by:
values
in interfaceTemplateHashModelEx
- Returns:
- a collection containing the values in the hash. The elements of the
returned collection can be any kind of
TemplateModel
-s.
-
transcode
-