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.AbstractAccessServlet
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
- Direct Known Subclasses:
DeletePrincipalAcesServlet
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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteAces
(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete) Deletes one or more ACEs from the access control list of a resource.protected void
deleteAces
(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete, List<Modification> changes) protected void
handleOperation
(SlingHttpServletRequest request, PostResponse htmlResponse, List<Modification> changes) Extending Servlet should implement this operation to do the workvalidateArgs
(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete) Verify that the user supplied arguments are validMethods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessPostServlet
allowNonExistingPaths, bindPostResponseCreator, createHtmlResponse, doPost, externalizePath, getAccessControlList, getAccessControlListOrNull, getItemPath, getParentPath, getRedirectUrl, getRedirectUrl, handleOperation, isSetStatus, unbindPostResponseCreator, validateResourcePath
Methods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessServlet
bindRestrictionProvider, getRestrictionProvider, unbindRestrictionProvider
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
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
Constructor Details
-
DeleteAcesServlet
public DeleteAcesServlet()
-
-
Method Details
-
handleOperation
protected void handleOperation(SlingHttpServletRequest request, PostResponse htmlResponse, List<Modification> changes) throws javax.jcr.RepositoryException Description copied from class:AbstractAccessPostServlet
Extending Servlet should implement this operation to do the work- Specified by:
handleOperation
in 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.RepositoryException Description copied from interface:DeleteAces
Deletes one or more ACEs from the access control list of a resource.- Specified by:
deleteAces
in 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
-
validateArgs
@NotNull protected @NotNull Set<Principal> validateArgs(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete) throws javax.jcr.RepositoryException Verify that the user supplied arguments are valid- Parameters:
jcrSession
- the JCR sessionresourcePath
- the resource pathprincipalNamesToDelete
- the principal ids to delelete- Returns:
- the principals for the requested principalIds
- Throws:
javax.jcr.RepositoryException
-
deleteAces
protected void deleteAces(javax.jcr.Session jcrSession, String resourcePath, String[] principalNamesToDelete, List<Modification> changes) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-