Polishing (selective backports from master)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,8 +20,6 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
/**
|
||||
* MVC View for a web interaction. Implementations are responsible for rendering
|
||||
* content, and exposing the model. A single view exposes multiple model attributes.
|
||||
@@ -39,6 +37,7 @@ import org.springframework.http.MediaType;
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @see org.springframework.web.servlet.view.AbstractView
|
||||
* @see org.springframework.web.servlet.view.InternalResourceView
|
||||
*/
|
||||
@@ -47,6 +46,7 @@ public interface View {
|
||||
/**
|
||||
* Name of the {@link HttpServletRequest} attribute that contains the response status code.
|
||||
* <p>Note: This attribute is not required to be supported by all View implementations.
|
||||
* @since 3.0
|
||||
*/
|
||||
String RESPONSE_STATUS_ATTRIBUTE = View.class.getName() + ".responseStatus";
|
||||
|
||||
@@ -54,33 +54,34 @@ public interface View {
|
||||
* Name of the {@link HttpServletRequest} attribute that contains a Map with path variables.
|
||||
* The map consists of String-based URI template variable names as keys and their corresponding
|
||||
* Object-based values -- extracted from segments of the URL and type converted.
|
||||
*
|
||||
* <p>Note: This attribute is not required to be supported by all View implementations.
|
||||
* @since 3.1
|
||||
*/
|
||||
String PATH_VARIABLES = View.class.getName() + ".pathVariables";
|
||||
|
||||
/**
|
||||
* The {@link MediaType} selected during content negotiation, which may be
|
||||
* more specific than the one the View is configured with. For example:
|
||||
* The {@link org.springframework.http.MediaType} selected during content negotiation,
|
||||
* which may be more specific than the one the View is configured with. For example:
|
||||
* "application/vnd.example-v1+xml" vs "application/*+xml".
|
||||
* @since 3.2
|
||||
*/
|
||||
String SELECTED_CONTENT_TYPE = View.class.getName() + ".selectedContentType";
|
||||
|
||||
|
||||
/**
|
||||
* Return the content type of the view, if predetermined.
|
||||
* <p>Can be used to check the content type upfront,
|
||||
* before the actual rendering process.
|
||||
* <p>Can be used to check the view's content type upfront,
|
||||
* i.e. before an actual rendering attempt.
|
||||
* @return the content type String (optionally including a character set),
|
||||
* or {@code null} if not predetermined.
|
||||
* or {@code null} if not predetermined
|
||||
*/
|
||||
String getContentType();
|
||||
|
||||
/**
|
||||
* Render the view given the specified model.
|
||||
* <p>The first step will be preparing the request: In the JSP case,
|
||||
* this would mean setting model objects as request attributes.
|
||||
* The second step will be the actual rendering of the view,
|
||||
* for example including the JSP via a RequestDispatcher.
|
||||
* <p>The first step will be preparing the request: In the JSP case, this would mean
|
||||
* setting model objects as request attributes. The second step will be the actual
|
||||
* rendering of the view, for example including the JSP via a RequestDispatcher.
|
||||
* @param model Map with name Strings as keys and corresponding model
|
||||
* objects as values (Map can also be {@code null} in case of empty model)
|
||||
* @param request current HTTP request
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -82,9 +82,7 @@ public class BindStatus {
|
||||
* @param htmlEscape whether to HTML-escape error messages and string values
|
||||
* @throws IllegalStateException if no corresponding Errors object found
|
||||
*/
|
||||
public BindStatus(RequestContext requestContext, String path, boolean htmlEscape)
|
||||
throws IllegalStateException {
|
||||
|
||||
public BindStatus(RequestContext requestContext, String path, boolean htmlEscape) throws IllegalStateException {
|
||||
this.requestContext = requestContext;
|
||||
this.path = path;
|
||||
this.htmlEscape = htmlEscape;
|
||||
|
||||
Reference in New Issue
Block a user