Class FedoraAcl

    • Field Detail

      • request

        @Context
        protected javax.ws.rs.core.Request request
      • servletResponse

        @Context
        protected javax.servlet.http.HttpServletResponse servletResponse
      • uriInfo

        @Context
        protected javax.ws.rs.core.UriInfo uriInfo
    • Constructor Detail

      • FedoraAcl

        public FedoraAcl()
        Default JAX-RS entry point
    • Method Detail

      • createFedoraWebacAcl

        @PUT
        public javax.ws.rs.core.Response createFedoraWebacAcl​(@HeaderParam("Content-Type")
                                                              javax.ws.rs.core.MediaType requestContentType,
                                                              InputStream requestBodyStream)
        PUT to create FedoraWebacACL resource.
        Parameters:
        requestContentType - The content type of the resource body
        requestBodyStream - The request body as stream
        Returns:
        the response for a request to create a Fedora WebAc acl
      • updateSparql

        @Consumes("application/sparql-update")
        public javax.ws.rs.core.Response updateSparql​(InputStream requestBodyStream)
                                               throws IOException,
                                                      org.fcrepo.kernel.api.exception.ItemNotFoundException
        PATCH to update an FedoraWebacACL resource using SPARQL-UPDATE
        Parameters:
        requestBodyStream - the request body stream
        Returns:
        204
        Throws:
        IOException - if IO exception occurred
        org.fcrepo.kernel.api.exception.ItemNotFoundException
      • getResource

        @GET
        @Produces({"text/turtle;charset=utf-8;qs=1.0","application/ld+json;qs=0.8","text/rdf+n3;charset=utf-8","text/n3;charset=utf-8","application/rdf+xml","application/n-triples","text/plain;charset=utf-8","application/x-turtle","text/html;charset=utf-8"})
        public javax.ws.rs.core.Response getResource()
                                              throws IOException,
                                                     org.fcrepo.kernel.api.exception.ItemNotFoundException
        GET to retrieve the ACL resource.
        Returns:
        a binary or the triples for the specified node
        Throws:
        IOException - if IO exception occurred
        org.fcrepo.kernel.api.exception.ItemNotFoundException
      • deleteObject

        @DELETE
        public javax.ws.rs.core.Response deleteObject()
                                               throws org.fcrepo.kernel.api.exception.ItemNotFoundException
        Deletes an object.
        Returns:
        response
        Throws:
        org.fcrepo.kernel.api.exception.ItemNotFoundException
      • getDefaultAcl

        public static org.apache.jena.rdf.model.Model getDefaultAcl​(String baseUri,
                                                                    Path customRootAcl)
        Retrieve the default root ACL from a user specified location if it exists, otherwise the one provided by Fedora will be used.
        Parameters:
        baseUri - the URI of the default ACL
        customRootAcl - the path to a custom root acl to use, optional
        Returns:
        Model the rdf model of the default root ACL