/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; import type IndexableUser from "../IndexableUser"; import type { IndexableContentExtractor } from "../../types/senselogic/sitevision/api/search/index/IndexableContentExtractor"; import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder"; /** *

* Builder for creating a {@link IndexableContentExtractor} instance. *

* *

* IndexableContentExtractorBuilder has one mandatory attribute and one optional attribute: *

* * *

* Using the IndexableContentExtractorBuilder is pretty straightforward, if you remember that it is stateful. * Conceptually you would typically use it like this: *

*
    *
  1. Get the IndexableContentExtractorBuilder
  2. *
  3. Set the page
  4. *
  5. Do build
  6. *
*

* When you have built a IndexableContentExtractorBuilder instance, you can re-use the IndexableContentExtractorBuilder * to build more instances. Typically like: *

*
    *
  1. Set the page
  2. *
  3. Do build
  4. *
* *

* Tip! The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains * more information about Builders and how to work with them and {@link senselogic.sitevision.api.render.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 * {@link IndexingUtil#getIndexableContentExtractorBuilder()}. * See {@link IndexingUtil} for how to obtain an instance of the IndexingUtil interface. *

* @author Magnus Lövgren * @since Sitevision 2026.03.1 */ export interface IndexableContentExtractorBuilder extends Builder { /** * Sets the page of this builder. * *

* Note! Due to security reasons (potential never-ending loops) it is prohibited to create a content extractor for * the currently executing page (i.e. {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentPage()})! *

* @param aPageNode a published page node (sv:page, sv:article, sv:sitePage) where current user has READ permission, must not be null or "current page". * @return this builder */ setPage(aPageNode: Node): IndexableContentExtractorBuilder; /** * Sets whether to extract content as the indexer user or current user. * @param aIndexableUser the indexable user. Default is {@link IndexableUser#CURRENT_USER}. * @return this builder */ setIndexableUser( aIndexableUser: IndexableUser ): IndexableContentExtractorBuilder; /** * Creates a IndexableContentExtractor instance for the page of this builder. * @return a content renderer instance * @throws 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. */ build(): IndexableContentExtractor; } declare namespace IndexableContentExtractorBuilder {} declare var indexableContentExtractorBuilder: IndexableContentExtractorBuilder; export default indexableContentExtractorBuilder;