use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method delete.
@DELETE
@Path("delete-client")
@Produces(MediaType.APPLICATION_JSON)
public Response delete(@QueryParam("client") String param) {
SimpleResult result = new SimpleResult();
result.setResult(param);
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method postWithParams.
@POST
@Path("post")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response postWithParams(Client client) {
SimpleResult result = new SimpleResult();
result.setResult(client.getId() + client.getName() + client.getEmail());
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method arrayResponse.
@POST
@Path("arrays-as-is")
@Produces(MediaType.APPLICATION_JSON)
public Response arrayResponse(String request) {
SimpleResult result = new SimpleResult();
BasicDBList response = (BasicDBList) JSON.parse(request);
result.setResult(response.toString());
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method getWithParams.
@GET
@Path("get-with-params-placeholder")
@Produces(MediaType.APPLICATION_JSON)
public Response getWithParams(@HeaderParam(Default.HEADER_PARAMETER_NAME_1) String header1, @HeaderParam("header2") String header2, @QueryParam(Default.QUERY_PARAMETER_NAME_1) String query) {
SimpleResult result = new SimpleResult();
result.setResult(query + header1 + header2);
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method put.
@PUT
@Path("put")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response put(Client client) {
SimpleResult result = new SimpleResult();
result.setResult(client.getId() + client.getName() + client.getEmail());
return Response.ok(result).build();
}
Aggregations