Class UsersExportServlet

java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
com.adobe.acs.commons.exporters.impl.users.UsersExportServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

@SlingServlet(methods="GET", resourceTypes="acs-commons/components/utilities/exporters/users-to-csv", selectors="export", extensions="csv") public class UsersExportServlet extends org.apache.sling.api.servlets.SlingSafeMethodsServlet
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Internal class representing a user that will be exported in CSV format.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    checkGroups(String[] groups, String groupFilter, UsersExportServlet.CsvUser csvUser)
    Determines if the user should be included based on the specified group filter type, and requested groups.
    void
    doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
    Generates a CSV file representing the User Data.

    Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet

    doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UsersExportServlet

      public UsersExportServlet()
  • Method Details

    • doGet

      public void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
      Generates a CSV file representing the User Data.
      Overrides:
      doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
      Parameters:
      request - the Sling HTTP Request object
      response - the Sling HTTP Response object
      Throws:
      IOException
      javax.servlet.ServletException
    • checkGroups

      protected boolean checkGroups(String[] groups, String groupFilter, UsersExportServlet.CsvUser csvUser) throws javax.jcr.RepositoryException
      Determines if the user should be included based on the specified group filter type, and requested groups.
      Parameters:
      groups - the groups
      groupFilter - the groupFilter
      csvUser - the user
      Returns:
      true if the user should be included.
      Throws:
      javax.jcr.RepositoryException