Package org.fenixedu.cms.api.resource
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
-
-
Constructor Summary
Constructors Constructor Description PostResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonElementaddPostFile(Post post, javax.servlet.http.HttpServletRequest request)voidcreateFileFromRequest(Post post, javax.servlet.http.Part part)javax.ws.rs.core.ResponsedeletePost(Post post)com.google.gson.JsonElementlistLatestVersion(Post post)com.google.gson.JsonElementlistPostFiles(Post post)com.google.gson.JsonElementlistPostVersions(Post post)com.google.gson.JsonElementupdatePost(Post post, com.google.gson.JsonElement json)-
Methods inherited from class org.fenixedu.bennu.core.rest.BennuRestResource
accessControl, accessControl, ok, readDomainObject, verifyAndGetRequestAuthor
-
-
-
-
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:
IOExceptionjavax.servlet.ServletException
-
createFileFromRequest
public void createFileFromRequest(Post post, javax.servlet.http.Part part) throws IOException
- Throws:
IOException
-
-