Java Code Examples for com.fasterxml.jackson.databind.SerializationFeature#INDENT_OUTPUT

The following examples show how to use com.fasterxml.jackson.databind.SerializationFeature#INDENT_OUTPUT . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@GET
@Path("/services")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getAllServices() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServices());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 2
@GET
@Path("/services/count")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getAllServicesCount() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServices().size());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 3
@GET
@Path("/services/{name}")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getServiceByName(@PathParam("name") String name) {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServiceByName(name));
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 4
@GET
@Path("/services/{name}/parameters")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getParametersByServiceName(@PathParam("name") String name) {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServiceByName(name).getParameters());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 5
@GET
@Path("/services/{name}/results")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getResultsByServiceName(@PathParam("name") String name) {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServiceByName(name).getResults());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 6
@GET
@Path("/services/{name}/mavendepends")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getMavenDependsByServiceName(@PathParam("name") String name) {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServiceByName(name).getMavenDependencies());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 7
@GET
@Path("/services/category/{category}")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getResultsByServiceCategory(@PathParam("category") String category) {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getServicesByCategory(category));
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 8
@GET
@Path("/servicetriggers")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getTriggerServices() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getTriggerServices());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 9
@GET
@Path("/servicetriggers/count")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getTriggerServiceCounts() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getTriggerServices().size());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 10
@GET
@Path("/serviceactions")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getActionServices() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getActionServices());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 11
@GET
@Path("/serviceactions/count")
@Produces({MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = {SerializationFeature.INDENT_OUTPUT})
public Response getActionServicesCount() {
    try {
        Response.ResponseBuilder responseBuilder = Response.ok(repoService.getActionServices().size());
        return responseBuilder.build();
    } catch (Exception e) {
        throw new javax.ws.rs.NotFoundException();
    }
}
 
Example 12
Source Project: irontest   File: TestcaseResource.java    License: Apache License 2.0 4 votes vote down vote up
@GET @Path("testcases/{testcaseId}/export")
@JsonView(ResourceJsonViews.TestcaseExport.class)
@JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT })
public Testcase export(@PathParam("testcaseId") long testcaseId) {
    return testcaseDAO.findById_Complete(testcaseId);
}