Package org.springframework.web.servlet.view

# Interface FragmentsRendering.Builder

Enclosing interface:
  FragmentsRendering

public static interface FragmentsRendering.Builder
Defines a builder for `FragmentsRendering`.

## Method Summary

Modifier and Type
Method
Description
`FragmentsRendering`
`build()`
Build a `FragmentsRendering` instance.
`FragmentsRendering.Builder`
`fragment(String viewName)`
Variant of `fragment(String, Map)` with a view name only, but also inheriting model attributes from the shared model for the request.
`FragmentsRendering.Builder`
`fragment(String viewName, Map<String,Object> model)`
Add a fragment with a view name and a model.
`FragmentsRendering.Builder`
`fragment(ModelAndView fragment)`
Variant of `fragment(String, Map)` with a `ModelAndView`.
`FragmentsRendering.Builder`
`fragments(Collection<ModelAndView> fragments)`
Variant of `fragment(String, Map)` with a collection of `ModelAndView`s.
`FragmentsRendering.Builder`
`header(String headerName, String... headerValues)`
Add one or more header values under the given name.
`FragmentsRendering.Builder`
`headers(Consumer<org.springframework.http.HttpHeaders> headersConsumer)`
Provides access to every header declared so far with the possibility to add, replace, or remove values.
`FragmentsRendering.Builder`
`status(org.springframework.http.HttpStatusCode status)`
Specify the status to use for the response.

## Method Details

### status

FragmentsRendering.Builder status(org.springframework.http.HttpStatusCode status)
Specify the status to use for the response.

Parameters:
  `status` - the status to set
Returns:
  this builder

### header

FragmentsRendering.Builder header(String headerName, String... headerValues)
Add one or more header values under the given name.

Parameters:
  `headerName` - the header name
  `headerValues` - the header value(s)
Returns:
  this builder

### headers

FragmentsRendering.Builder headers(Consumer<org.springframework.http.HttpHeaders> headersConsumer)
Provides access to every header declared so far with the possibility to add, replace, or remove values.

Parameters:
  `headersConsumer` - the consumer to provide access to
Returns:
  this builder

### fragment

FragmentsRendering.Builder fragment(String viewName, Map<String,Object> model)
Add a fragment with a view name and a model.

Parameters:
  `viewName` - the name of the view for the fragment
  `model` - attributes for the fragment in addition to model attributes inherited from the shared model for the request
Returns:
  this builder

### fragment

FragmentsRendering.Builder fragment(String viewName)
Variant of `fragment(String, Map)` with a view name only, but also inheriting model attributes from the shared model for the request.

Parameters:
  `viewName` - the name of the view for the fragment
Returns:
  this builder

### fragment

FragmentsRendering.Builder fragment(ModelAndView fragment)
Variant of `fragment(String, Map)` with a `ModelAndView`.

Parameters:
  `fragment` - the fragment to add; the fragment also inherits model attributes from the shared model for the request
Returns:
  this builder

### fragments

FragmentsRendering.Builder fragments(Collection<ModelAndView> fragments)
Variant of `fragment(String, Map)` with a collection of `ModelAndView`s.

Parameters:
  `fragments` - the fragments to add; each fragment also inherits model attributes from the shared model for the request
Returns:
  this builder

### build

FragmentsRendering build()
Build a `FragmentsRendering` instance.