}
protected ProcessApplicationInfoImpl createProcessApplicationInfo(final AbstractProcessApplication processApplication,
final Map<String, DeployedProcessArchive> processArchiveDeploymentMap) {
// populate process application info
ProcessApplicationInfoImpl processApplicationInfo = new ProcessApplicationInfoImpl();
processApplicationInfo.setName(processApplication.getName());
processApplicationInfo.setProperties(processApplication.getProperties());
// create deployment infos
List<ProcessApplicationDeploymentInfo> deploymentInfoList = new ArrayList<ProcessApplicationDeploymentInfo>();
if(processArchiveDeploymentMap != null) {
for (Entry<String, DeployedProcessArchive> deployment : processArchiveDeploymentMap.entrySet()) {
final DeployedProcessArchive deployedProcessArchive = deployment.getValue();
for (String deploymentId : deployedProcessArchive.getAllDeploymentIds()) {
ProcessApplicationDeploymentInfoImpl deploymentInfo = new ProcessApplicationDeploymentInfoImpl();
deploymentInfo.setDeploymentId(deploymentId);
deploymentInfo.setProcessEngineName(deployedProcessArchive.getProcessEngineName());
deploymentInfoList.add(deploymentInfo);
}
}
}
processApplicationInfo.setDeploymentInfo(deploymentInfoList);
return processApplicationInfo;
}