org.apache.sling.jackrabbit.usermanager.impl.post
Class DeleteAuthorizableServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
org.apache.sling.jackrabbit.usermanager.impl.post.AbstractAuthorizablePostServlet
org.apache.sling.jackrabbit.usermanager.impl.post.DeleteAuthorizableServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class DeleteAuthorizableServlet
- extends AbstractAuthorizablePostServlet
Rest Service Description
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
Methods
Post Parameters
- :applyTo
- An array of relative resource references to Authorizables to be deleted, if this parameter is present, the url is ignored and all the Authorizables in the list are removed.
Response
- 200
- Success, no body.
- 404
- The resource was not found
- 500
- Failure
Example
curl -Fgo=1 http://localhost:8080/system/userManager/user/ieb.delete.html
- See Also:
- Serialized Form
Methods inherited from class org.apache.sling.jackrabbit.usermanager.impl.post.AbstractAuthorizablePostServlet |
activate, collectContent, createHtmlResponse, deactivate, doPost, externalizePath, getItemPath, getRedirectUrl, hasItemPathPrefix, isSetStatus, processDeletes, requireItemPathPrefix, writeContent |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteAuthorizableServlet
public DeleteAuthorizableServlet()
handleOperation
protected void handleOperation(SlingHttpServletRequest request,
HtmlResponse htmlResponse,
List<Modification> changes)
throws javax.jcr.RepositoryException
- Description copied from class:
AbstractAuthorizablePostServlet
- Extending Servlet should implement this operation to do the work
- Specified by:
handleOperation
in class AbstractAuthorizablePostServlet
- Parameters:
request
- the sling http request to processhtmlResponse
- the response
- Throws:
javax.jcr.RepositoryException
getApplyToResources
protected Iterator<Resource> getApplyToResources(SlingHttpServletRequest request)
- Returns an iterator on
Resource
instances addressed in the
SlingPostConstants.RP_APPLY_TO
request parameter. If the request
parameter is not set, null
is returned. If the parameter is
set with valid resources an empty iterator is returned. Any resources
addressed in the SlingPostConstants.RP_APPLY_TO
parameter is
ignored.
- Parameters:
request
- The SlingHttpServletRequest
object used to
get the SlingPostConstants.RP_APPLY_TO
parameter.
- Returns:
- The iterator of resources listed in the parameter or
null
if the parameter is not set in the request.
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.