Interface FragmentsRendering.Builder

Enclosing interface:
FragmentsRendering

public static interface FragmentsRendering.Builder
Defines a builder for FragmentsRendering.
since:
6.2
Author:
Rossen stoyanchev
  • Method Details

    • 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&nbsp;headers(Consumer<HttpHeaders>&nbsp;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&nbsp;fragment(string&nbsp;viewName, Map<string,Object>&nbsp;model)
      Add an HTML fragment.
      Parameters:
      viewName - the view name for the fragment
      model - fragment attributes in addition to attributes from the shared model for the request
      Returns:
      this builder
    • fragment

      FragmentsRendering.Builder&nbsp;fragment(string&nbsp;viewName)
      Add an HTML fragment. The fragment will use attributes from the shared model for the request.
      Parameters:
      viewName - the view name for the fragment
      Returns:
      this builder
    • fragment

      FragmentsRendering.Builder&nbsp;fragment(Fragment&nbsp;fragment)
      Add an HTML fragment.
      Parameters:
      fragment - the fragment to add; the fragment also inherits attributes from the shared model for the request
      Returns:
      this builder
    • fragments

      FragmentsRendering.Builder&nbsp;fragments(Collection<Fragment>&nbsp;fragments)
      Add HTML fragments.
      Parameters:
      fragments - the fragments to add; each fragment also inherits attributes from the shared model for the request
      Returns:
      this builder
      since:
      6.2.13
    • build

      FragmentsRendering&nbsp;build()
      Build the FragmentsRendering instance.