public interface RequestDataValueProcessor
Implementations may use this contract for example as part of a solution to provide data integrity, confidentiality, protection against cross-site request forgery (CSRF), and others or for other tasks such as automatically adding a hidden field to all forms and URLs.
View technologies that support this contract can obtain an instance to
delegate to via RequestContext.getRequestDataValueProcessor().
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getExtraHiddenFields(HttpServletRequest request)
Invoked after all form fields have been rendered.
|
String |
processAction(HttpServletRequest request,
String action,
String httpMethod)
Invoked when a new form action is rendered.
|
String |
processFormFieldValue(HttpServletRequest request,
String name,
String value,
String type)
Invoked when a form field value is rendered.
|
String |
processUrl(HttpServletRequest request,
String url)
Invoked when a URL is about to be rendered or redirected to.
|
String processAction(HttpServletRequest request, String action, String httpMethod)
request - the current requestaction - the form actionhttpMethod - the form HTTP methodString processFormFieldValue(HttpServletRequest request, String name, String value, String type)
request - the current requestname - the form field namevalue - the form field valuetype - the form field type ("text", "hidden", etc.)Map<String,String> getExtraHiddenFields(HttpServletRequest request)
request - the current requestnullString processUrl(HttpServletRequest request, String url)
request - the current requesturl - the URL value