Package de.espirit.firstspirit.agency
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 Summary
Modifier and TypeMethodDescription@NotNull RenderingAgent.Renderer
additionalContext
(@NotNull String key, @Nullable Object value) Adds the provided value to the top-most context.@NotNull RenderingAgent.Renderer
additionalContext
(@NotNull Map<String, ?> additionalContext) Adds the provided values to the topmost context.@NotNull RenderingAgent.Renderer
Set the provided page reference as context (e.g. to provide the sitestore variables in the rendering context).@NotNull RenderingAgent.Renderer
context
(@NotNull SiteStoreFolder folder) Set the provided folder as context (e.g. to provide the sitestore variables in the rendering context).@NotNull RenderingAgent.Renderer
Provide a dataset to be used for a content projection.@NotNull RenderingAgent.Renderer
datasetIdentifier
(@NotNull Identifier identifier) Provide a dataset to be used for a content projection (e.g. detail view, one entity per page).@NotNull RenderingAgent.Renderer
evaluateProjectProperties
(boolean value) Switch flag if theProjectProperties
should be evaluated whenrendering content
.@NotNull RenderingAgent.RenderResult
Trigger the rendering of the node and delivers the rendering result.@NotNull RenderingAgent.BasicRenderResult
Trigger the rendering of the node and delivers the rendering result.@NotNull RenderingAgent.Renderer
Overwrite which language should be used for rendering - default language is the project master language.@NotNull RenderingAgent.Renderer
Overwrite which language should be used for rendering - default language is the project master language.@NotNull RenderingAgent.Renderer
logListener
(LogListener logListener) Provide the listener for log events during rendering.@NotNull RenderingAgent.Renderer
mediaLinkListener
(@NotNull RenderingAgent.MediaLinkListener mediaLinkListener) Provide the listener for media link events during rendering.@NotNull RenderingAgent.Renderer
Set the desiredrender mode
.@NotNull RenderingAgent.Renderer
pageIndex
(int index) Provide the sub-page index for content projections.@NotNull RenderingAgent.Renderer
preview()
@NotNull RenderingAgent.Renderer
Deprecated.since 5.2.2105 no replacement. will log by default, set desired log level via configuration@NotNull String
render()
Trigger the rendering of the node and delivers the rendered output.@NotNull RenderingAgent.Renderer
Switch offProjectProperties
evaluation whenrendering content
.@NotNull RenderingAgent.Renderer
strict()
@NotNull RenderingAgent.Renderer
templateSet
(@NotNull TemplateSet templateSet) Overwrite which template set should be used for rendering - default template set is the first template set of the project.@NotNull RenderingAgent.Renderer
templateSet
(@NotNull String templateSetUid) Overwrite which template set should be used for rendering - default template set is the first template set of the project.@NotNull RenderingAgent.Renderer
urlFactory
(@NotNull UrlFactory urlFactory) Set a custom url factory (default is the preview url factory).@NotNull RenderingAgent.Renderer
urlFactory
(@NotNull String publicName) Set a custom url factory (default is the preview url factory).@NotNull RenderingAgent.Renderer
urlFactorySettings
(@NotNull Map<String, String> urlFactorySettings) Set custom initialization parameters (will be passed toUrlFactory.init(Map, PathLookup)
of the configured url factory).@NotNull RenderingAgent.Renderer
Set the url prefix used for absolute urls generated with$CMS_REF(..., abs:1)$
.@NotNull RenderingAgent.Renderer
webedit()
-
Method Details
-
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
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
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
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
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
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
- Returns:
- The current renderer to support fluent call chaining.
- Since:
- 5.2.1503
-
webedit
- Returns:
- The current renderer to support fluent call chaining.
- Since:
- 5.2.1503
-
strict
- Returns:
- The current renderer to support fluent call chaining.
- Since:
- 5.2.180704
-
mode
Set the desiredrender mode
.- Parameters:
mode
- Rendering mode, eitherRenderingAgent.RenderMode.PREVIEW
,RenderingAgent.RenderMode.WEBEDIT
,RenderingAgent.RenderMode.DEFAULT
, orRenderingAgent.RenderMode.STRICT
.- Returns:
- The current renderer to support fluent call chaining.
- Since:
- 5.2.1503
-
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
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 toUrlFactory.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
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
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.since 5.2.2105 no replacement. will log by default, set desired log level via configurationRedirect 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
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
Provide the sub-page index for content projections. The index should be between0
andContent2Params.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
Switch flag if theProjectProperties
should be evaluated whenrendering content
. The default behaviour is that the project properties are evaluated (true
).- Parameters:
value
- New value, the default value istrue
.- Returns:
- The current renderer to support fluent call chaining.
- Since:
- 5.2.1804
- See Also:
-
skipProjectProperties
Switch offProjectProperties
evaluation whenrendering content
. This is the same asevaluateProjectProperties(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
Trigger the rendering of the node and delivers the rendered output. This is a shortcut forgetResult()
.getContent()
.- Returns:
- The rendered content.
- Since:
- 5.2.1503
- See Also:
-
getResult
Trigger the rendering of the node and delivers the rendering result.- Returns:
- The rendering result, including
RenderingAgent.RenderResult.getContent()
() content} andlog
. - 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.
-