protected void renderContent()

in src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java [774:810]


    protected void renderContent(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        final PrintWriter pw = response.getWriter();

        pw.println(BR);

        String alert = getParameter(request, PN_ALERT, "");
        if (StringUtils.isNotBlank(alert)) {
            info(pw, alert);
        }

        String action = getParameter(request, PN_ACTION, "");
        if (StringUtils.isBlank(action)) {
            log.debug("Rendering service users page");
            info(
                    pw,
                    "Service users are used by OSGi Services to access the Sling repository. Use this form to find and create service users.");

            try {
                printServiceUsers(request, pw);
            } catch (LoginException e) {
                log.warn("Exception rendering service users", e);
                info(pw, "Exception rendering service users");
            }
        } else if ("details".equals(action)) {
            log.debug("Rendering service user details page");
            try {
                printServiceUserDetails(request, pw);
            } catch (RepositoryException | LoginException e) {
                log.warn("Exception rendering details for user", e);
                info(pw, "Exception rendering details for user");
            }
        } else {
            info(pw, "Unknown action: " + action);
        }
    }