
@Path(value="/{a:project}")
@Api(name="Project Resource",
description="Methods for managing Project")
@ApiVersion(since="1.0")
public class ProjectResource
extends Object
| Constructor and Description |
|---|
ProjectResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
create(ProjectDto dto) |
ProjectDto |
delete(String id) |
Collection<ProjectDto> |
findAll() |
ProjectDto |
load(String id) |
ProjectDto |
update(String id,
ProjectDto dto) |
public ProjectResource()
@GET
@Produces(value="application/json")
@ApiMethod(path="/project",
verb=GET,
description="Gets all projects",
produces="application/json",
responsestatuscode="200 - OK")
@ApiErrors(apierrors=@ApiError(code="500",description="Application critical error"))
@ApiResponseObject
public Collection<ProjectDto> findAll()
@GET
@Path(value="/{id}")
@Produces(value="application/json")
@ApiMethod(path="/project/{id}",
verb=GET,
description="Get the project by it\'s identifier",
produces="application/json",
responsestatuscode="200 - OK")
@ApiError(code="400",description="Bad request") @ApiError(code="404",description="Project not found") @ApiError(code="500",description="Application critical error")
@ApiResponseObject
public ProjectDto load(@ApiPathParam(name="id",description="The project identifier") @PathParam(value="id")
String id)
@DELETE
@Path(value="/{id}")
@Produces(value="application/json")
@ApiMethod(path="/project/{id}",
verb=DELETE,
description="Delete the project by it\'s identifier",
produces="application/json",
responsestatuscode="200 - OK")
@ApiError(code="400",description="Bad request") @ApiError(code="404",description="Project not found") @ApiError(code="500",description="Application critical error")
@ApiResponseObject
public ProjectDto delete(@ApiPathParam(name="id",description="The project identifier") @PathParam(value="id")
String id)
@POST
@Consumes(value="application/json")
@Produces(value="application/json")
@ApiMethod(path="/project",
verb=POST,
description="Create new project version by project\'s identifier",
produces="application/json",
consumes="application/json",
responsestatuscode="201 - Created")
@ApiError(code="400",description="Bad request") @ApiError(code="404",description="Project not found") @ApiError(code="500",description="Application critical error")
@ApiResponseObject
public javax.ws.rs.core.Response create(@ApiBodyObject
ProjectDto dto)
@PUT
@Path(value="/{id}")
@Consumes(value="application/json")
@Produces(value="application/json")
@ApiMethod(path="/project/{id}",
verb=PUT,
description="Create new project version by project\'s identifier",
produces="application/json",
consumes="application/json",
responsestatuscode="200 - OK")
@ApiError(code="400",description="Bad request") @ApiError(code="404",description="Project not found") @ApiError(code="500",description="Application critical error")
@ApiResponseObject
public ProjectDto update(@ApiPathParam(name="id",description="The project identifier") @PathParam(value="id")
String id,
@ApiBodyObject
ProjectDto dto)
Copyright © 2015 Maxim Yunusov. All rights reserved.