org.apache.sling.jcr.jackrabbit.accessmanager.post
Class GetAclServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by org.apache.sling.api.servlets.SlingSafeMethodsServlet
          extended by org.apache.sling.api.servlets.SlingAllMethodsServlet
              extended by org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractGetAclServlet
                  extended by org.apache.sling.jcr.jackrabbit.accessmanager.post.GetAclServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GetAclServlet
extends AbstractGetAclServlet

Sling GET servlet implementation for dumping the declared ACL of a resource to JSON.

Rest Service Description

Mapped to the default resourceType. Gets and Acl for a resource. Get of the form >resource<.acl.json Provided the user has access to the ACL, they get a chunk of JSON of the form.

Methods

Response

200
Success.
404
The resource was not found.
500
Failure. HTML explains the failure.

Example Response

 {
 "principalNameA":
      { "granted" : [
           "permission1",
           "permission2",
           "permission3",
           "permission4" ],
        "denied" : [
           "permission5",
           "permission6",
           "permission7",
           "permission8"]
       },
 "principalNameB":
       { "granted" : [
           "permission1",
           "permission2",
           "permission3",
           "permission4" ],
         "denied" : [
           "permission5",
           "permission6",
           "permission7",
           "permission8"] },
 "principalNameC":
       { "granted" : [
           "permission1",
           "permission2",
           "permission3",
           "permission4" ],
         "denied" : [
           "permission5",
           "permission6",
           "permission7",
           "permission8"] }
 }
 

See Also:
Serialized Form

Constructor Summary
GetAclServlet()
           
 
Method Summary
protected  javax.jcr.security.AccessControlEntry[] getAccessControlEntries(javax.jcr.Session session, String absPath)
           
 
Methods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractGetAclServlet
doGet
 
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPost, doPut, getAllowedRequestMethods, isMethodValid, mayService
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetAclServlet

public GetAclServlet()
Method Detail

getAccessControlEntries

protected javax.jcr.security.AccessControlEntry[] getAccessControlEntries(javax.jcr.Session session,
                                                                          String absPath)
                                                                   throws javax.jcr.RepositoryException
Specified by:
getAccessControlEntries in class AbstractGetAclServlet
Throws:
javax.jcr.RepositoryException


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.