Class GetAceServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, GetAce

    public class GetAceServlet
    extends AbstractGetAceServlet
    implements GetAce

    Sling Get Servlet implementation for getting the ACE for a principal on a JCR resource.

    Rest Service Description

    Get a principal's ACE for the node identified as a resource by the request URL >resource<.ace.json?pid=[principal_id]

    Transport Details:

    Methods

    • GET

    Get Parameters

    pid
    The principal id of the ACE to get in the ACL specified by the path.

    Response

    200
    Success.
    404
    The resource was not found or no access control entries exist for the principal.
    500
    Failure. JSON explains the failure.
    See Also:
    Serialized Form
    • Constructor Detail

      • GetAceServlet

        public GetAceServlet()
    • Method Detail

      • getAce

        public javax.json.JsonObject getAce​(javax.jcr.Session jcrSession,
                                            String resourcePath,
                                            String principalId)
                                     throws javax.jcr.RepositoryException
        Description copied from interface: GetAce
        Gets the declared access control entry for a resource and principal
        Specified by:
        getAce in interface GetAce
        Parameters:
        jcrSession - the JCR session of the user updating the user
        resourcePath - The path of the resource to get the ACE for (required)
        principalId - the principal to get the ACE for (required)
        Returns:
        the ACE as a JSON object
        Throws:
        javax.jcr.RepositoryException - if any errors reading the information