Interface FragmentsRendering.Builder
- Enclosing interface:
- FragmentsRendering
public static interface FragmentsRendering.Builder
Defines a builder for 
FragmentsRendering.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build aFragmentsRenderinginstance.Variant offragment(String, Map)with a view name only, but also inheriting model attributes from the shared model for the request.Add a fragment with a view name and a model.fragment(ModelAndView fragment) Variant offragment(String, Map)with aModelAndView.fragments(Collection<ModelAndView> fragments) Variant offragment(String, Map)with a collection ofModelAndViews.Add one or more header values under the given name.headers(Consumer<HttpHeaders> headersConsumer) Provides access to every header declared so far with the possibility to add, replace, or remove values.status(HttpStatusCode status) Specify the status to use for the response.
- 
Method Details- 
statusSpecify the status to use for the response.- Parameters:
- status- the status to set
- Returns:
- this builder
 
- 
headerAdd one or more header values under the given name.- Parameters:
- headerName- the header name
- headerValues- the header value(s)
- Returns:
- this builder
 
- 
headersProvides 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
 
- 
fragmentAdd 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
 
- 
fragmentVariant offragment(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
 
- 
fragmentVariant offragment(String, Map)with aModelAndView.- Parameters:
- fragment- the fragment to add; the fragment also inherits model attributes from the shared model for the request
- Returns:
- this builder
 
- 
fragmentsVariant offragment(String, Map)with a collection ofModelAndViews.- Parameters:
- fragments- the fragments to add; each fragment also inherits model attributes from the shared model for the request
- Returns:
- this builder
 
- 
buildFragmentsRendering build()Build aFragmentsRenderinginstance.
 
-