Package com.composum.nodes.debugutil
Class ComponentDerivationTreeServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- com.composum.nodes.debugutil.ComponentDerivationTreeServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class ComponentDerivationTreeServlet extends org.apache.sling.api.servlets.SlingSafeMethodsServlet
Makes a tree of all derived components (connected with sling:resourceSuperType). Usage:wget --user=admin --password=admin -O componenttree.dotty http://localhost:9090/bin/cpm/nodes/debug/componenttree.dotty ;
There can also be a parameter regex to filter the components we consider.
ccomps -x componenttree.dotty | dot | gvpack | neato -Tpng -n2 -o componenttree.png ; open componenttree.pngFor mermaid diagram (to include e.g. into Github markdown), use extension .mermaid, e.g. http://localhost:4502/bin/cpm/nodes/debug/componenttree.mermaid?regex=wknd
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ComponentDerivationTreeServlet.Configuration
-
Field Summary
Fields Modifier and Type Field Description protected ComponentDerivationTreeServlet.Configuration
config
protected Pattern
ignoreComponentsRegex
protected static String
PARAM_REGEX
Optional regex to limit components' path.
-
Constructor Summary
Constructors Constructor Description ComponentDerivationTreeServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(ComponentDerivationTreeServlet.Configuration config)
protected void
deactivate()
protected void
doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
-
-
-
-
Field Detail
-
PARAM_REGEX
protected static final String PARAM_REGEX
Optional regex to limit components' path.- See Also:
- Constant Field Values
-
config
protected volatile ComponentDerivationTreeServlet.Configuration config
-
ignoreComponentsRegex
protected volatile Pattern ignoreComponentsRegex
-
-
Method Detail
-
doGet
protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Overrides:
doGet
in classorg.apache.sling.api.servlets.SlingSafeMethodsServlet
- Throws:
IOException
javax.servlet.ServletException
-
activate
protected void activate(ComponentDerivationTreeServlet.Configuration config)
-
deactivate
protected void deactivate()
-
-