/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; /** * Content Node utility interface. * *

* A "Content node" (e.g sv:portlet) is a Node that is located in the "content section" of a "Renderable node" (e.g. sv:page). *

*

* This utility is typically used to get the parent of a Content node, either the content parent (typically a sv:layout) * or the renderable parent (typically a sv:page). *

*

* The types of a "Content node" is defined in {@link senselogic.sitevision.api.node.NodeTypeUtil#isAnyContentType(Node)}. * The types of a "Renderable node" is defined in {@link senselogic.sitevision.api.node.NodeTypeUtil#isAnyRenderableType(Node)}. *

* *

* An instance of the Sitevision class implementing this interface can be obtained via * {@link senselogic.sitevision.api.Utils#getContentNodeUtil()}. * See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface. *

* @author Magnus Lövgren * @since Sitevision 10.2 */ export interface ContentNodeUtil { /** * Gets the renderable parent of a given content node. * *

* See {@link senselogic.sitevision.api.node.NodeTypeUtil#isAnyRenderableType(Node)} for what type a "Renderable node" can have. *

* @param aContentNode a content node, typically a sv:portlet or sv:layout * @return the renderable parent of aContentNode (typically a sv:page), or null if aContentNode has no renderable parent or if current user doesn't have READ permission on the renderable parent */ getRenderableParent(aContentNode: Node): Node; /** * Gets the content parent of a given content node. * *

* See {@link senselogic.sitevision.api.node.NodeTypeUtil#isAnyContentType(Node)} for what type a "Content node" can have. *

* *

* * Element disclaimer! The content structure of an Element (sv:moduleElement/sv:moduleElementDraft) potentially differs * in the OFFLINE and ONLINE versions. * Typically you should not use this method with aContentNode located within an Element. * *

* @param aContentNode a content node, typically a sv:portlet or sv:layout * @return the content parent of aContentNode (typically a sv:layout), or null if aContentNode has no content parent */ getContentParent(aContentNode: Node): Node; } declare namespace ContentNodeUtil {} declare var contentNodeUtil: ContentNodeUtil; export default contentNodeUtil;