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 there are two variants of this class: One for the legacy "javax" Servlet API in the
freemarker.ext.servlet package, and another for the newer Jakarta Servlet API in the
freemarker.ext.jakarta.servlet package (since 2.3.33). Use the variant that fits your Servlet container!
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING -
Constructor Summary
ConstructorsConstructorDescriptionHttpRequestParametersHashModel(jakarta.servlet.http.HttpServletRequest request) -
Method Summary
-
Constructor Details
-
HttpRequestParametersHashModel
public HttpRequestParametersHashModel(jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
get
Description copied from interface:TemplateHashModelGets aTemplateModelfrom the hash.- Specified by:
getin interfaceTemplateHashModel- Parameters:
key- The name by which theTemplateModelis identified in the template.- Returns:
- The
TemplateModelreferred to by the key, ornullif not found.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceTemplateHashModel
-
size
public int size()- Specified by:
sizein interfaceTemplateHashModelEx- Returns:
- the number of key/value mappings in the hash.
-
keys
- Specified by:
keysin 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:
valuesin interfaceTemplateHashModelEx- Returns:
- a collection containing the values in the hash. The elements of the
returned collection can be any kind of
TemplateModel-s.
-
transcode
-