Class NodeTreeServlet.TreeOperation

  • All Implemented Interfaces:
    ServletOperation
    Enclosing class:
    NodeTreeServlet

    public class NodeTreeServlet.TreeOperation
    extends Object
    implements ServletOperation
    creates a JSON object for the requested node (requested by the suffix); this JSON response contains the node identifiers, some node type hints and a list of the children of the node; this operation provides the data for a tree implementation which requests the nodes on demand suffix: the path to the node selectors / parameters: - 'label': 'name' or 'title' - selects the value to use for the nodes 'text' attribute URL examples: - http://host/bin/cpm/nodes/node.tree.json/path/to/the/node - http://host/bin/cpm/nodes/node.tree.title.json/path/to/the/node - http://host/bin/cpm/nodes/node.tree.json/path/to/the/node?label=title
    • Constructor Detail

      • TreeOperation

        public TreeOperation()
    • Method Detail

      • getNodeFilter

        protected ResourceFilter getNodeFilter​(org.apache.sling.api.SlingHttpServletRequest request)
      • doIt

        public void doIt​(@NotNull
                         @NotNull org.apache.sling.api.SlingHttpServletRequest request,
                         @NotNull
                         @NotNull org.apache.sling.api.SlingHttpServletResponse response,
                         @Nullable
                         @Nullable ResourceHandle resource)
                  throws javax.servlet.ServletException,
                         IOException
        Specified by:
        doIt in interface ServletOperation
        Throws:
        javax.servlet.ServletException
        IOException