Class ScaffoldingUtils


  • public class ScaffoldingUtils
    extends java.lang.Object
    Helpers for scaffolding.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONTEXT_RESOURCE_ATTR_NAME
      The name of the request attribute used to store the scaffolding context (ie: the resource being edited via the scaffolding).
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String findScaffoldByPath​(Node node, java.lang.String path)
      Search the scaffolding hierarchy starting at node (normally /etc/scaffolding) for a scaffold which targets the given path (or an ancestor of the given path).
      static java.lang.String findScaffoldByTemplate​(Node node, java.lang.String template)
      Search the scaffolding hierarchy starting at node (normally /etc/scaffolding) for a scaffold which targets the given template.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CONTEXT_RESOURCE_ATTR_NAME

        public static java.lang.String CONTEXT_RESOURCE_ATTR_NAME
        The name of the request attribute used to store the scaffolding context (ie: the resource being edited via the scaffolding).
    • Constructor Detail

      • ScaffoldingUtils

        public ScaffoldingUtils()
    • Method Detail

      • findScaffoldByTemplate

        public static java.lang.String findScaffoldByTemplate​(Node node,
                                                              java.lang.String template)
                                                       throws RepositoryException
        Search the scaffolding hierarchy starting at node (normally /etc/scaffolding) for a scaffold which targets the given template.
        Parameters:
        node - the node
        template - the template
        Returns:
        String scaffold
        Throws:
        RepositoryException - the RepositoryException
      • findScaffoldByPath

        public static java.lang.String findScaffoldByPath​(Node node,
                                                          java.lang.String path)
                                                   throws RepositoryException
        Search the scaffolding hierarchy starting at node (normally /etc/scaffolding) for a scaffold which targets the given path (or an ancestor of the given path).
        Parameters:
        node - the node
        path - the given path for which scaffolding hierarchy to be searched.
        Returns:
        String the Scaffold.
        Throws:
        RepositoryException - the RepositoryException