Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kie.remote.services.rest;
 
 import java.util.Map;
 
 import  javax.enterprise.context.RequestScoped;
 import  javax.inject.Inject;
 import  javax.ws.rs.GET;
 import  javax.ws.rs.Path;
 import  javax.ws.rs.core.Context;
import  javax.ws.rs.core.HttpHeaders;
import  javax.ws.rs.core.Response;
import  org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnitList;
import  org.kie.services.client.serialization.jaxb.impl.process.JaxbProcessDefinitionList;

This resource is responsible for retrieving overview information about all deployment units.
@Path("/deployment")
@RequestScoped
public class DeploymentsResourceImpl extends ResourceBase {
    @Context
    private HttpHeaders headers;
   
    /* Deployment operations */
   
    @Inject
  
    // REST operations -----------------------------------------------------------------------------------------------------------

    
Return a (paginated) list of the available deployments, sorted alphabetically by deployment id.

Returns:
A JaxbDeploymentUnitList instance
    @GET
    public Response listDeployments() { 
        String oper = getRelativePath();
        Map<StringString[]> params = getRequestParams();
        int [] pageInfo = getPageNumAndPageSize(paramsoper);
        int maxNumResults = getMaxNumResultsNeeded(pageInfo); 
        
       JaxbDeploymentUnitList resultList = .getDeploymentList(pageInfomaxNumResults);
       
        return createCorrectVariant(resultList);
    }
   

    
Return a list of process definition information, sorted alphabetically by deployment id.

Returns:
    @GET
    @Path("/processes")
    public Response listProcessDefinitions() { 
        String oper = getRelativePath();
        Map<StringString[]> params = getRequestParams();
        int [] pageInfo = getPageNumAndPageSize(paramsoper);
        int maxNumResults = getMaxNumResultsNeeded(pageInfo); 
        
        JaxbProcessDefinitionList resultList = .getProcessDefinitionList(pageInfomaxNumResults);
        
        return createCorrectVariant(resultList);
    }
New to GrepCode? Check out our FAQ X