Package com.composum.sling.core.servlet
Class NodeTreeServlet.TreeOperation
- java.lang.Object
-
- com.composum.sling.core.servlet.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 Summary
Constructors Constructor Description TreeOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doIt(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response, @Nullable ResourceHandle resource)
protected ResourceFilter
getNodeFilter(org.apache.sling.api.SlingHttpServletRequest request)
protected NodeTreeServlet.TreeNodeStrategy
getNodeStrategy(org.apache.sling.api.SlingHttpServletRequest request)
-
-
-
Method Detail
-
getNodeStrategy
protected NodeTreeServlet.TreeNodeStrategy getNodeStrategy(org.apache.sling.api.SlingHttpServletRequest request)
-
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 interfaceServletOperation
- Throws:
javax.servlet.ServletException
IOException
-
-