Class DeleteAcesServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.api.servlets.SlingAllMethodsServlet
-
- org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessPostServlet
-
- org.apache.sling.jcr.jackrabbit.accessmanager.post.DeleteAcesServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,DeleteAces
public class DeleteAcesServlet extends AbstractAccessPostServlet implements DeleteAces
Sling Post Servlet implementation for deleting the ACE for a set of principals on a JCR resource.
Rest Service Description
Delete a set of Ace's from a node, the node is identified as a resource by the request url >resource<.deleteAce.html
Transport Details:
Methods
- POST
Post Parameters
- :applyTo
- An array of ace principal names to delete. Note the principal name is the primary key of the Ace in the Acl
Response
- 200
- Success.
- 404
- The resource was not found.
- 500
- Failure. HTML explains the failure.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeleteAcesServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator, Map<String,Object> properties)Overridden since the @Reference annotation is not inherited from the super methodvoiddeleteAces(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete)Deletes one or more ACEs from the access control list of a resource.protected voiddeleteAces(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete, List<org.apache.sling.servlets.post.Modification> changes)protected voidhandleOperation(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.servlets.post.PostResponse htmlResponse, List<org.apache.sling.servlets.post.Modification> changes)Extending Servlet should implement this operation to do the workprotected voidunbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator, Map<String,Object> properties)Unbind a post response creator-
Methods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessPostServlet
createHtmlResponse, doPost, externalizePath, getAccessControlList, getAccessControlListOrNull, getItemPath, getRedirectUrl, getRedirectUrl, handleOperation, isSetStatus
-
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
-
-
-
-
Method Detail
-
bindPostResponseCreator
protected void bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator, Map<String,Object> properties)Overridden since the @Reference annotation is not inherited from the super method- Overrides:
bindPostResponseCreatorin classAbstractAccessPostServlet- Parameters:
creator- the response creator service referenceproperties- the component properties for the service reference
-
unbindPostResponseCreator
protected void unbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator, Map<String,Object> properties)Description copied from class:AbstractAccessPostServletUnbind a post response creator- Overrides:
unbindPostResponseCreatorin classAbstractAccessPostServlet- Parameters:
creator- the response creator service referenceproperties- the component properties for the service reference
-
handleOperation
protected void handleOperation(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.servlets.post.PostResponse htmlResponse, List<org.apache.sling.servlets.post.Modification> changes) throws javax.jcr.RepositoryExceptionDescription copied from class:AbstractAccessPostServletExtending Servlet should implement this operation to do the work- Specified by:
handleOperationin classAbstractAccessPostServlet- Parameters:
request- the sling http request to processhtmlResponse- the responsechanges- the changes to report- Throws:
javax.jcr.RepositoryException- if any errors applying the changes
-
deleteAces
public void deleteAces(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete) throws javax.jcr.RepositoryExceptionDescription copied from interface:DeleteAcesDeletes one or more ACEs from the access control list of a resource.- Specified by:
deleteAcesin interfaceDeleteAces- Parameters:
jcrSession- the JCR session of the user updating the userresourcePath- The path of the resource to update the ACL for (required)principalNamesToDelete- An array of ace principal names to delete.. (required)- Throws:
javax.jcr.RepositoryException- if any errors applying the changes
-
-