Class ClientlibDebugConsolePlugin

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class ClientlibDebugConsolePlugin
    extends javax.servlet.http.HttpServlet
    Prints 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
    • Field Detail

      • SELECTOR_REGEX

        protected static final Pattern SELECTOR_REGEX
        Extracts the (single) selector from a URL.
      • REQUEST_PARAM_LIB

        protected static final String REQUEST_PARAM_LIB
        Request parameter to restrict output to one library
        See Also:
        Constant Field Values
      • REQUEST_PARAM_IMPERSONATE

        protected static final String REQUEST_PARAM_IMPERSONATE
        Request parameter to check permissions / view clientlibs for one user.
        See Also:
        Constant Field Values
      • REQUEST_PARAM_TYPE

        protected 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_CACHE

        protected 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_FILTER

        protected 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
      • resolverFactory

        protected org.apache.sling.api.resource.ResourceResolverFactory resolverFactory
    • Constructor Detail

      • ClientlibDebugConsolePlugin

        public ClientlibDebugConsolePlugin()
    • Method Detail

      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              IOException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • requestedClientlibType

        protected Clientlib.Type requestedClientlibType​(javax.servlet.http.HttpServletRequest request)