Class PostResource

java.lang.Object
org.fenixedu.bennu.core.rest.JsonAwareResource
org.fenixedu.bennu.core.rest.BennuRestResource
org.fenixedu.cms.api.resource.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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gson.JsonElement
    addPostFile(Post post, javax.servlet.http.HttpServletRequest request)
     
    void
    createFileFromRequest(Post post, javax.servlet.http.Part part)
     
    javax.ws.rs.core.Response
     
    com.google.gson.JsonElement
     
    com.google.gson.JsonElement
     
    com.google.gson.JsonElement
     
    com.google.gson.JsonElement
    updatePost(Post post, com.google.gson.JsonElement json)
     

    Methods inherited from class org.fenixedu.bennu.core.rest.BennuRestResource

    accessControl, accessControl, ok, readDomainObject, verifyAndGetRequestAuthor

    Methods inherited from class org.fenixedu.bennu.core.rest.JsonAwareResource

    create, create, getBuilder, merge, parse, setDefault, toJson, update, update, view, view, view, view, view, view, viewPaginated, viewPaginated, viewPaginated

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PostResource

      public PostResource()
  • Method Details

    • 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