public class DeleteAuthorizableServlet extends AbstractPostServlet implements DeleteUser, DeleteGroup, DeleteAuthorizables
Deletes an Authorizable, currently a user or a group. Maps on to nodes of resourceType sling/users or sling/users like
/rep:system/rep:userManager/rep:users or /rep:system/rep:userManager/rep:groups mapped to a resource url
/system/userManager/user or /system/userManager/group. This servlet responds at
/system/userManager/user.delete.html or /system/userManager/group.delete.html.
The servlet also responds to single delete requests eg /system/userManager/group/newGroup.delete.html
curl -Fgo=1 http://localhost:8080/system/userManager/user/ieb.delete.html
| Constructor and Description |
|---|
DeleteAuthorizableServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAuthorizables(javax.jcr.Session jcrSession,
org.apache.sling.api.resource.Resource baseResource,
String[] paths,
List<org.apache.sling.servlets.post.Modification> changes)
Deletes one or more users or groups from the repository
|
void |
deleteGroup(javax.jcr.Session jcrSession,
String name,
List<org.apache.sling.servlets.post.Modification> changes)
Deletes a group from the repository
|
void |
deleteUser(javax.jcr.Session jcrSession,
String name,
List<org.apache.sling.servlets.post.Modification> changes)
Deletes a user from the repository
|
protected void |
handleOperation(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.servlets.post.AbstractPostResponse response,
List<org.apache.sling.servlets.post.Modification> changes)
Extending Servlet should implement this operation to do the work
|
createHtmlResponse, doPost, externalizePath, getItemPath, getRedirectUrl, isSetStatusdoDelete, doPut, getAllowedRequestMethods, isMethodValid, mayServicedoGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, serviceprotected void handleOperation(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.servlets.post.AbstractPostResponse response,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
AbstractPostServlethandleOperation in class AbstractPostServletrequest - the sling http request to processresponse - the responsechanges - the changes to reportjavax.jcr.RepositoryException - in case of exceptions during the operationpublic void deleteUser(javax.jcr.Session jcrSession,
String name,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
DeleteUserdeleteUser in interface DeleteUserjcrSession - the JCR session of the user creating the username - The name of the user to delete (required)changes - The list of changes for this operation (optional)javax.jcr.RepositoryException - if user can't be deletedpublic void deleteGroup(javax.jcr.Session jcrSession,
String name,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
DeleteGroupdeleteGroup in interface DeleteGroupjcrSession - the JCR session of the user creating the username - The name of the group to delete (required)changes - The list of changes for this operation (optional)javax.jcr.RepositoryException - if group can't be deletedpublic void deleteAuthorizables(javax.jcr.Session jcrSession,
org.apache.sling.api.resource.Resource baseResource,
String[] paths,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
DeleteAuthorizablesdeleteAuthorizables in interface DeleteAuthorizablesjcrSession - the JCR session of the user creating the userbaseResource - the base resource to calculate the relative paths from (required)paths - An array of relative resource paths to Authorizables to be deleted (required)changes - The list of changes for this operation (optional)javax.jcr.RepositoryException - if authorizable (user or group) can't be deletedCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.