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 ClassesModifier and TypeClassDescriptionprotected static classInternal class representing a user that will be exported in CSV format. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckGroups(String[] groups, String groupFilter, UsersExportServlet.CsvUser csvUser) Determines if the user should be included based on the specified group filter type, and requested groups.voiddoGet(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, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
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:
doGetin classorg.apache.sling.api.servlets.SlingSafeMethodsServlet- Parameters:
request- the Sling HTTP Request objectresponse- the Sling HTTP Response object- Throws:
IOExceptionjavax.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 groupsgroupFilter- the groupFiltercsvUser- the user- Returns:
- true if the user should be included.
- Throws:
javax.jcr.RepositoryException
-