Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="IndexableContentExtractorBuilder") public interface IndexableContentExtractorBuilder extends Builder<IndexableContentExtractor>
Builder for creating a IndexableContentExtractor instance.
IndexableContentExtractorBuilder has one mandatory attribute and one optional attribute:
IndexableUser.CURRENT_USER (i.e. page will be rendered by current user during extraction).
Using the IndexableContentExtractorBuilder is pretty straightforward, if you remember that it is stateful. Conceptually you would typically use it like this:
When you have built a IndexableContentExtractorBuilder instance, you can re-use the IndexableContentExtractorBuilder
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
IndexingUtil.getIndexableContentExtractorBuilder().
See IndexingUtil for how to obtain an instance of the IndexingUtil interface.
| Modifier and Type | Method and Description |
|---|---|
IndexableContentExtractor |
build()
Creates a IndexableContentExtractor instance for the page of this builder.
|
IndexableContentExtractorBuilder |
setIndexableUser(IndexableUser aIndexableUser)
Sets whether to extract content as the indexer user or current user.
|
IndexableContentExtractorBuilder |
setPage(Node aPageNode)
Sets the page of this builder.
|
IndexableContentExtractorBuilder setPage(Node aPageNode)
Note! Due to security reasons (potential never-ending loops) it is prohibited to create a content extractor for
the currently executing page (i.e. PortletContextUtil.getCurrentPage())!
aPageNode - a published page node (sv:page, sv:article, sv:sitePage) where current user has READ permission,
must not be null or "current page".IndexableContentExtractorBuilder setIndexableUser(IndexableUser aIndexableUser)
aIndexableUser - the indexable user. Default is IndexableUser.CURRENT_USER.IndexableContentExtractor build() throws IllegalStateException
build in interface Builder<IndexableContentExtractor>IllegalStateException - if no page is set or if page is not published or if page is invalid (e.g. "current page")
or if current user does not have READ permission on the 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.