public class RequestParamMarshaller extends Object
ContentItem
.Modifier and Type | Field and Description |
---|---|
protected javax.servlet.http.HttpServletRequest |
mRequest |
protected Map<String,String> |
mRequestMap |
Constructor and Description |
---|
RequestParamMarshaller() |
Modifier and Type | Method and Description |
---|---|
static void |
convertToBoolean(ContentItem item,
String key)
Helper method for converting the String value associated with a key to a boolean.
|
static void |
convertToInt(ContentItem item,
String key)
Helper method for converting the String value associated with a key to an integer.
|
static void |
convertToList(ContentItem item,
String key)
Helper method for converting a pipe delimited String value associated with a key to a list of strings.
|
static void |
convertToLong(ContentItem item,
String key)
Helper method for converting the String value associated with a key to a long.
|
ContentItem |
marshall()
Creates a new ContentItem and populates it with information from the
HttpServletRequest.
|
void |
override(ContentItem contentItem)
Helper method for layering a ContentItem on top of another ContentItem.
|
void |
setHttpServletRequest(javax.servlet.http.HttpServletRequest pRequest)
Sets the current servlet request.
|
void |
setRequestMap(Map<String,String> requestMap)
Sets the mapping of request parameters to ContentItem keys.
|
public void setHttpServletRequest(javax.servlet.http.HttpServletRequest pRequest)
public void setRequestMap(Map<String,String> requestMap)
public ContentItem marshall()
public void override(ContentItem contentItem)
contentItem
- the ContentItem to mutate by overlaying the values
from another ContentItempublic static void convertToLong(ContentItem item, String key)
public static void convertToInt(ContentItem item, String key)
public static void convertToBoolean(ContentItem item, String key)
public static void convertToList(ContentItem item, String key)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.