Class ContentRest


  • @Path("/{spaceID: (?!acl/)[^/]+}/{contentID: [^?]+}")
    @Component
    public class ContentRest
    extends BaseRest
    Provides interaction with content via REST
    Author:
    Bill Branan
    • Method Detail

      • getContent

        @GET
        public javax.ws.rs.core.Response getContent​(@PathParam("spaceID")
                                                    String spaceID,
                                                    @PathParam("contentID")
                                                    String contentID,
                                                    @QueryParam("storeID")
                                                    String storeID,
                                                    @QueryParam("attachment")
                                                    boolean attachment,
                                                    @HeaderParam("Range")
                                                    String range)
        see ContentResource.getContent() see ContentResource.getContentProperties()
        Returns:
        200 response with content stream as body and content properties as headers
      • getContentProperties

        @HEAD
        public javax.ws.rs.core.Response getContentProperties​(@PathParam("spaceID")
                                                              String spaceID,
                                                              @PathParam("contentID")
                                                              String contentID,
                                                              @QueryParam("storeID")
                                                              String storeID)
        see ContentResource.getContentProperties()
        Returns:
        200 response with content properties as headers
      • addContentPropertiesToResponse

        protected javax.ws.rs.core.Response addContentPropertiesToResponse​(javax.ws.rs.core.Response.ResponseBuilder response,
                                                                           Map<String,​String> properties)
        Adds the properties of a content item as header values to the response. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 for specifics on particular headers.
      • validMimetype

        protected boolean validMimetype​(String mimetype)
      • updateContentProperties

        @POST
        public javax.ws.rs.core.Response updateContentProperties​(@PathParam("spaceID")
                                                                 String spaceID,
                                                                 @PathParam("contentID")
                                                                 String contentID,
                                                                 @QueryParam("storeID")
                                                                 String storeID)
        see ContentResource.updateContentProperties()
        Returns:
        200 response indicating content properties updated successfully
      • putContent

        @PUT
        public javax.ws.rs.core.Response putContent​(@PathParam("spaceID")
                                                    String spaceID,
                                                    @PathParam("contentID")
                                                    String contentID,
                                                    @QueryParam("storeID")
                                                    String storeID,
                                                    @HeaderParam("x-dura-meta-copy-source")
                                                    String copySource,
                                                    @HeaderParam("x-dura-meta-copy-source-store")
                                                    String sourceStoreID)
        see ContentResource.addContent() and ContentResource.copyContent().
        Returns:
        201 response indicating content added/copied successfully
      • deleteContent

        @DELETE
        public javax.ws.rs.core.Response deleteContent​(@PathParam("spaceID")
                                                       String spaceID,
                                                       @PathParam("contentID")
                                                       String contentID,
                                                       @QueryParam("storeID")
                                                       String storeID)
        see ContentResource.removeContent()
        Returns:
        200 response indicating content removed successfully