コード例 #1
0
 @PATCH
 @Path("/{projectid}")
 @JsonView(Views.Advance.class)
 public ProjectWrapper updateProject(
     @PathParam("projectid") String projectid, ProjectWrapper projectWrapper) throws Exception {
   return (ProjectWrapper) projectController.updateProject(projectid, projectWrapper.getRef());
 }
コード例 #2
0
 @POST
 @JsonView(Views.Advance.class)
 public Response createProject(ProjectWrapper projectWrapper) throws Exception {
   return Response.status(Status.CREATED)
       .entity(projectController.createProject(projectWrapper.getRef()))
       .build();
 }
コード例 #3
0
 @GET
 @JsonView(Views.Advance.class)
 public ProjectsWrapper listProject(
     @QueryParam("domain_id") String domainid,
     @QueryParam("name") String name,
     @QueryParam("enabled") Boolean enabled,
     @DefaultValue("1") @QueryParam("page") int page,
     @DefaultValue("30") @QueryParam("per_page") int perPage)
     throws Exception {
   return (ProjectsWrapper) projectController.listProjects();
 }
コード例 #4
0
 @DELETE
 @Path("/{projectid}")
 public Response deleteProject(@PathParam("projectid") String projectid) throws Exception {
   projectController.deleteProject(projectid);
   return Response.status(CustomResponseStatus.NO_CONTENT).build();
 }
コード例 #5
0
 @GET
 @Path("/{projectid}")
 @JsonView(Views.Advance.class)
 public ProjectWrapper getProject(@PathParam("projectid") String projectid) throws Exception {
   return (ProjectWrapper) projectController.getProject(projectid);
 }