Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="ContentRendererBuilder") public interface ContentRendererBuilder extends Builder<ContentRenderer>
Builder for creating a ContentRenderer instance.
ContentRendererBuilder has one mandatory attribute and one optional attribute:
Using the ContentRendererBuilder is pretty straightforward, if you remember that it is stateful. Conceptually you would typically use it like this:
When you have built a ContentRenderer instance, you can re-use the ContentRendererBuilder to build more instances.
Typically like:
Tip! The Builder interface documentation contains
more information about Builders and how to work with them and TextModuleRenderer has a code example of how
this builder and its result can be used.
An instance of the Sitevision class implementing this interface can be obtained via
RendererBuilderFactory.getContentRendererBuilder().
See RendererBuilderFactory for how to obtain an instance of the RendererBuilderFactory interface.
| Modifier and Type | Method and Description |
|---|---|
ContentRenderer |
build()
Creates a ContentRenderer instance for the page of this builder.
|
ContentRendererBuilder |
setPage(Node aPageNode)
Sets the page of this builder.
|
ContentRendererBuilder |
setParameters(Map<String,String> aParameters)
Sets parameters for the page, to be used when rendering content.
|
ContentRendererBuilder setPage(Node aPageNode)
Note! Due to security reasons (potential never-ending loops) it is prohibited to create a content renderer for
the currently executing page (i.e. PortletContextUtil.getCurrentPage())!
aPageNode - a page node (sv:page, sv:article, sv:sitePage) where current user has READ permission, must not be null or "current page".ContentRendererBuilder setParameters(Map<String,String> aParameters)
aParameters - a map of parametersContentRenderer build() throws IllegalStateException
build in interface Builder<ContentRenderer>IllegalStateException - if no page is set or if page is invalid (e.g. "current page")Sitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.