public JaxbProcessDefinitionList getProcessDefinitionList(int [] pageInfo, int maxNumResults) {
List<String> deploymentIds = new ArrayList<String>(deploymentInfoBean.getDeploymentIds());
Collections.sort(deploymentIds);
JaxbProcessDefinitionList jaxbProcDefList = new JaxbProcessDefinitionList();
List<JaxbProcessDefinition> procDefList = jaxbProcDefList.getProcessDefinitionList();
for( String deploymentId : deploymentIds ) {
fillProcessDefinitionList(deploymentId, pageInfo, maxNumResults, procDefList);
if( procDefList.size() == maxNumResults) {
// pagination parameters indicate that no more than current list is needed
break;
}
}
JaxbProcessDefinitionList resultList = paginateAndCreateResult(pageInfo, procDefList, new JaxbProcessDefinitionList());
return resultList;
}