Interface FragmentsRendering.Builder
- Enclosing interface:
- FragmentsRendering
public static interface FragmentsRendering.Builder
Defines a builder for
FragmentsRendering
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theFragmentsRendering
instance.Variant offragment(String, Map)
with a view name only, where the fragment model also inherits model attributes from the shared model for the request.Add a fragment with a view name and a model.Variant offragment(String, Map)
with aFragment
.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
-
status
Specify the status to use for the response.- Parameters:
status
- the status to set- Returns:
- this builder
-
header
Add one or more header values under the given name.- Parameters:
headerName
- the header nameheaderValues
- the header value(s)- Returns:
- this builder
-
headers
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
Add a fragment with a view name and a model.- Parameters:
viewName
- the name of the view for the fragmentmodel
- attributes for the fragment in addition to model attributes inherited from the model for the request- Returns:
- this builder
-
fragment
Variant offragment(String, Map)
with a view name only, where the fragment model also inherits model attributes from the shared model for the request.- Parameters:
viewName
- the name of the view for the fragment- Returns:
- this builder
-
fragment
Variant offragment(String, Map)
with aFragment
.- Parameters:
fragment
- the fragment to add- Returns:
- this builder
-
build
FragmentsRendering build()Build theFragmentsRendering
instance.
-