Class PostResource


  • @Path("/cms/posts")
    public class PostResource
    extends org.fenixedu.bennu.core.rest.BennuRestResource
    • Field Summary

      • Fields inherited from class org.fenixedu.bennu.core.rest.JsonAwareResource

        advice$innerCreate, advice$innerUpdate
    • Constructor Summary

      Constructors 
      Constructor Description
      PostResource()  
    • Constructor Detail

      • PostResource

        public PostResource()
    • Method Detail

      • listLatestVersion

        @GET
        @Produces("application/json")
        @Path("/{oid}")
        public com.google.gson.JsonElement listLatestVersion​(@PathParam("oid")
                                                             Post post)
      • deletePost

        @DELETE
        @Produces("application/json")
        @Path("/{oid}")
        public javax.ws.rs.core.Response deletePost​(@PathParam("oid")
                                                    Post post)
      • updatePost

        @PUT
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/{oid}")
        public com.google.gson.JsonElement updatePost​(@PathParam("oid")
                                                      Post post,
                                                      com.google.gson.JsonElement json)
      • listPostVersions

        @GET
        @Produces("application/json")
        @Path("/{oid}/versions")
        public com.google.gson.JsonElement listPostVersions​(@PathParam("oid")
                                                            Post post)
      • listPostFiles

        @GET
        @Produces("application/json")
        @Path("/{oid}/files")
        public com.google.gson.JsonElement listPostFiles​(@PathParam("oid")
                                                         Post post)
      • addPostFile

        @POST
        @Consumes("multipart/form-data")
        @Produces("application/json")
        @Path("/{oid}/files")
        public com.google.gson.JsonElement addPostFile​(@PathParam("oid")
                                                       Post post,
                                                       @Context
                                                       javax.servlet.http.HttpServletRequest request)
                                                throws IOException,
                                                       javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • createFileFromRequest

        public void createFileFromRequest​(Post post,
                                          javax.servlet.http.Part part)
                                   throws IOException
        Throws:
        IOException