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 . 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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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
Source File: RepositoryService.java    From jbpm-work-items with Apache License 2.0 5 votes vote down vote up
@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 File: TestcaseResource.java    From irontest with 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);
}