Class ClientlibDebugConsolePlugin
- java.lang.Object
- 
- javax.servlet.GenericServlet
- 
- javax.servlet.http.HttpServlet
- 
- com.composum.sling.clientlibs.servlet.ClientlibDebugConsolePlugin
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- javax.servlet.Servlet,- javax.servlet.ServletConfig
 
 public class ClientlibDebugConsolePlugin extends javax.servlet.http.HttpServletPrints a rough overview over the structure of the client library, incl. dependent or embedded client libraries. Works as a Sling Console plugin.- Since:
- 10/2017
- Author:
- Hans-Peter Stoerr
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classClientlibDebugConsolePlugin.DebugVisitorprotected classClientlibDebugConsolePlugin.ProcessorEncapsulates stuff always needed during one request, to avoid passing it on through all methods as parameters.
 - 
Field SummaryFields Modifier and Type Field Description protected ClientlibServiceclientlibServiceprotected static StringLOC_CSSLocation for the CSS.protected static StringREQUEST_PARAM_CLEAR_CACHERequest parameter that triggers clearing the clientlib cache.protected static StringREQUEST_PARAM_FILTERRequest parameter that sets a filter for clientlibs.protected static StringREQUEST_PARAM_IMPERSONATERequest parameter to check permissions / view clientlibs for one user.protected static StringREQUEST_PARAM_LIBRequest parameter to restrict output to one libraryprotected static StringREQUEST_PARAM_TYPERequest parameter that overrides the type selector, when used from the form.protected org.apache.sling.api.resource.ResourceResolverFactoryresolverFactoryprotected static PatternSELECTOR_REGEXExtracts the (single) selector from a URL.
 - 
Constructor SummaryConstructors Constructor Description ClientlibDebugConsolePlugin()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voidinitResolvers(ClientlibDebugConsolePlugin.Processor processor, String impersonation)protected Clientlib.TyperequestedClientlibType(javax.servlet.http.HttpServletRequest request)- 
Methods inherited from class javax.servlet.http.HttpServletdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
- 
 
- 
- 
- 
Field Detail- 
SELECTOR_REGEXprotected static final Pattern SELECTOR_REGEX Extracts the (single) selector from a URL.
 - 
REQUEST_PARAM_LIBprotected static final String REQUEST_PARAM_LIB Request parameter to restrict output to one library- See Also:
- Constant Field Values
 
 - 
REQUEST_PARAM_IMPERSONATEprotected static final String REQUEST_PARAM_IMPERSONATE Request parameter to check permissions / view clientlibs for one user.- See Also:
- Constant Field Values
 
 - 
REQUEST_PARAM_TYPEprotected static final String REQUEST_PARAM_TYPE Request parameter that overrides the type selector, when used from the form.- See Also:
- Constant Field Values
 
 - 
REQUEST_PARAM_CLEAR_CACHEprotected static final String REQUEST_PARAM_CLEAR_CACHE Request parameter that triggers clearing the clientlib cache. Obviously something to be used sparingly.- See Also:
- Constant Field Values
 
 - 
REQUEST_PARAM_FILTERprotected static final String REQUEST_PARAM_FILTER Request parameter that sets a filter for clientlibs. When listing all clientlibs, Only clientlibs where the filter regex can be found in the name, path, category or description are shown.- See Also:
- Constant Field Values
 
 - 
LOC_CSSprotected static final String LOC_CSS Location for the CSS.- See Also:
- Constant Field Values
 
 - 
clientlibServiceprotected ClientlibService clientlibService 
 - 
resolverFactoryprotected org.apache.sling.api.resource.ResourceResolverFactory resolverFactory 
 
- 
 - 
Method Detail- 
doPostprotected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
- doPostin class- javax.servlet.http.HttpServlet
- Throws:
- javax.servlet.ServletException
- IOException
 
 - 
doGetprotected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
- doGetin class- javax.servlet.http.HttpServlet
- Throws:
- javax.servlet.ServletException
- IOException
 
 - 
initResolversprotected void initResolvers(ClientlibDebugConsolePlugin.Processor processor, String impersonation) throws javax.servlet.ServletException - Throws:
- javax.servlet.ServletException
 
 - 
requestedClientlibTypeprotected Clientlib.Type requestedClientlibType(javax.servlet.http.HttpServletRequest request) 
 
- 
 
-