Interface RenderingAgent.Renderer

Enclosing interface:
RenderingAgent

public static interface RenderingAgent.Renderer
Node specific renderer, use render() or getResult() to get the rendered template output. All other methods support fluent chaining. If you call a specific method twice, the value provided in the first call is lost.
Since:
5.2.1503
  • Method Details

    • language

      @NotNull @NotNull RenderingAgent.Renderer language(@NotNull @NotNull Language language)
      Overwrite which language should be used for rendering - default language is the project master language.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • language

      @NotNull @NotNull RenderingAgent.Renderer language(@NotNull @NotNull String abbreviation)
      Overwrite which language should be used for rendering - default language is the project master language.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • templateSet

      @NotNull @NotNull RenderingAgent.Renderer templateSet(@NotNull @NotNull TemplateSet templateSet)
      Overwrite which template set should be used for rendering - default template set is the first template set of the project.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • templateSet

      @NotNull @NotNull RenderingAgent.Renderer templateSet(@NotNull @NotNull String templateSetUid)
      Overwrite which template set should be used for rendering - default template set is the first template set of the project.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • context

      @NotNull @NotNull RenderingAgent.Renderer context(@NotNull @NotNull SiteStoreFolder folder)
      Set the provided folder as context (e.g. to provide the sitestore variables in the rendering context).
      Parameters:
      folder - Folder node to determine variables from.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • context

      @NotNull @NotNull RenderingAgent.Renderer context(@NotNull @NotNull PageRef pageRef)
      Set the provided page reference as context (e.g. to provide the sitestore variables in the rendering context).
      Parameters:
      pageRef - Page reference node to determine variables from.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.180704
    • additionalContext

      @NotNull @NotNull RenderingAgent.Renderer additionalContext(@NotNull @NotNull Map<String,?> additionalContext)
      Adds the provided values to the topmost context. This can be called multiple times to extend the context. Later calls with identical keys override values which has been provided earlier.
      Parameters:
      additionalContext - Sets the provided values as top-most context.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • additionalContext

      @NotNull @NotNull RenderingAgent.Renderer additionalContext(@NotNull @NotNull String key, @Nullable @Nullable Object value)
      Adds the provided value to the top-most context. This can be called multiple times to extend the context. Later calls with identical keys override values which has been provided earlier.
      Parameters:
      key - Variable name.
      value - Variable value.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1805
    • preview

      @NotNull @NotNull RenderingAgent.Renderer preview()
      Shortcut for mode(PREVIEW).
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • webedit

      @NotNull @NotNull RenderingAgent.Renderer webedit()
      Shortcut for mode(WEBEDIT).
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • strict

      @NotNull @NotNull RenderingAgent.Renderer strict()
      Shortcut for mode(STRICT). See the description of the enum value for a detailed description.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.180704
    • mode

      @NotNull @NotNull RenderingAgent.Renderer mode(@NotNull RenderingAgent.RenderMode mode)
      Set the desired render mode.
      Parameters:
      mode - Rendering mode, either RenderingAgent.RenderMode.PREVIEW, RenderingAgent.RenderMode.WEBEDIT, RenderingAgent.RenderMode.DEFAULT, or RenderingAgent.RenderMode.STRICT.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • urlFactory

      @NotNull @NotNull RenderingAgent.Renderer urlFactory(@NotNull @NotNull UrlFactory urlFactory)
      Set a custom url factory (default is the preview url factory).
      Parameters:
      urlFactory - An url factory instance.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • urlFactory

      @NotNull @NotNull RenderingAgent.Renderer urlFactory(@NotNull @NotNull String publicName)
      Set a custom url factory (default is the preview url factory).
      Parameters:
      publicName - The public name of an url factory instance which will be used for $CMS_REF(..)$ expressions during rendering
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • urlFactorySettings

      @NotNull @NotNull RenderingAgent.Renderer urlFactorySettings(@NotNull @NotNull Map<String,String> urlFactorySettings)
      Set custom initialization parameters (will be passed to UrlFactory.init(Map, PathLookup) of the configured url factory).
      Parameters:
      urlFactorySettings - Initialization parameters for the url factory.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • urlPrefix

      @NotNull @NotNull RenderingAgent.Renderer urlPrefix(@NotNull @NotNull String urlPrefix)
      Set the url prefix used for absolute urls generated with $CMS_REF(..., abs:1)$. A full qualified or a path may be provided. The leading slash when providing a path could be omitted.
      Parameters:
      urlPrefix - Full qualified prefix.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1607
    • logListener

      @NotNull @NotNull RenderingAgent.Renderer logListener(@NotNull LogListener logListener)
      Provide the listener for log events during rendering.
      Parameters:
      logListener - Listener which will be called for log events during rendering.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • redirectTemplateLogToDefaultLog

      @Deprecated @NotNull @NotNull RenderingAgent.Renderer redirectTemplateLogToDefaultLog()
      Deprecated.
      since 5.2.2105 no replacement. will log by default, set desired log level via configuration
      Redirect template logging to default log. Template logging is e.g. produced with #global.logInfo("message text").
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1805
      See Also:
    • mediaLinkListener

      @NotNull @NotNull RenderingAgent.Renderer mediaLinkListener(@NotNull @NotNull RenderingAgent.MediaLinkListener mediaLinkListener)
      Provide the listener for media link events during rendering.
      Parameters:
      mediaLinkListener - the listener to call for each linked media.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
    • dataset

      @NotNull @NotNull RenderingAgent.Renderer dataset(@NotNull @NotNull Dataset dataset)
      Provide a dataset to be used for a content projection.
      Parameters:
      dataset - the dataset to render for content projections.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • datasetIdentifier

      @NotNull @NotNull RenderingAgent.Renderer datasetIdentifier(@NotNull @NotNull Identifier identifier)
      Provide a dataset to be used for a content projection (e.g. detail view, one entity per page).
      Parameters:
      identifier - the identifier of the dataset to render for content projections.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • pageIndex

      @NotNull @NotNull RenderingAgent.Renderer pageIndex(int index)
      Provide the sub-page index for content projections. The index should be between 0 and Content2Params.getPageCount(Language).
      Parameters:
      index - the index of the sub-page to render.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1503
      See Also:
    • evaluateProjectProperties

      @NotNull @NotNull RenderingAgent.Renderer evaluateProjectProperties(boolean value)
      Switch flag if the ProjectProperties should be evaluated when rendering content. The default behaviour is that the project properties are evaluated (true).
      Parameters:
      value - New value, the default value is true.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1804
      See Also:
    • skipProjectProperties

      @NotNull @NotNull RenderingAgent.Renderer skipProjectProperties()
      Switch off ProjectProperties evaluation when rendering content. This is the same as evaluateProjectProperties(false). The default behaviour is that the project properties are evaluated.
      Returns:
      The current renderer to support fluent call chaining.
      Since:
      5.2.1804
      See Also:
    • render

      @NotNull @NotNull String render()
      Trigger the rendering of the node and delivers the rendered output. This is a shortcut for getResult().getContent().
      Returns:
      The rendered content.
      Since:
      5.2.1503
      See Also:
    • getResult

      @NotNull @NotNull RenderingAgent.RenderResult getResult()
      Trigger the rendering of the node and delivers the rendering result.
      Returns:
      The rendering result, including RenderingAgent.RenderResult.getContent() () content} and log.
      Since:
      5.2.1503
    • getResult

      @NotNull @NotNull RenderingAgent.BasicRenderResult getResult(@NotNull @NotNull Writer contentWriter, @Nullable @Nullable Writer logWriter)
      Trigger the rendering of the node and delivers the rendering result.
      Parameters:
      contentWriter - the Writer to write that is used for the output of the content
      logWriter - the Writer to write that is used for the output of the log
      Returns:
      The rendering result.
      Since:
      5.2.230506