@Test public void deployEmptyPathList() { ProcessDefinitionDeployer deployer = new ProcessDefinitionDeployerImpl( createProcessEngineMock()); deployer.deployProcessDefinitions("test bundle", Collections.<URL> emptyList()); verify(deploymentBuilder).deploy(); }
@Override public void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList) { try { LOGGER.log(Level.FINE, "Found process in bundle " + bundleSymbolicName + " with paths: " + pathList); if (engine == null) { throw new IllegalStateException( "Unable to find a ProcessEngine service"); } RepositoryService service = engine.getRepositoryService(); DeploymentBuilder builder = service.createDeployment(); builder.name(bundleSymbolicName); for (URL url : pathList) { InputStream is = url.openStream(); if (is == null) { throw new IOException("Error opening url: " + url); } try { builder.addInputStream(getPath(url), is); } finally { is.close(); } } builder.enableDuplicateFiltering(true); builder.deploy(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to deploy bundle", e); } }
ProcessDefinitionDeployerImpl implements ProcessDefinitionDeployer { @Override public void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList) { try { LOGGER.log(Level.FINE, "Found process in bundle " + bundleSymbolicName + " with paths: " + pathList); if (engine == null) { throw new IllegalStateException( "Unable to find a ProcessEngine service"); } RepositoryService service = engine.getRepositoryService(); DeploymentBuilder builder = service.createDeployment(); builder.name(bundleSymbolicName); for (URL url : pathList) { InputStream is = url.openStream(); if (is == null) { throw new IOException("Error opening url: " + url); } try { builder.addInputStream(getPath(url), is); } finally { is.close(); } } builder.enableDuplicateFiltering(true); builder.deploy(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to deploy bundle", e); } } }
ProcessDefinitionDeployerImpl implements ProcessDefinitionDeployer { @Override public void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList) { try { LOGGER.log(Level.FINE, "Found process in bundle " + bundleSymbolicName + " with paths: " + pathList); if (engine == null) { throw new IllegalStateException( "Unable to find a ProcessEngine service"); } RepositoryService service = engine.getRepositoryService(); DeploymentBuilder builder = service.createDeployment(); builder.name(bundleSymbolicName); for (URL url : pathList) { InputStream is = url.openStream(); if (is == null) { throw new IOException("Error opening url: " + url); } try { builder.addInputStream(getPath(url), is); } finally { is.close(); } } builder.enableDuplicateFiltering(true); builder.deploy(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to deploy bundle", e); } } ProcessDefinitionDeployerImpl();  ProcessDefinitionDeployerImpl(ProcessEngine engine); }
ProcessDefinitionDeployerImpl implements ProcessDefinitionDeployer { @Override public void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList) { try { LOGGER.log(Level.FINE, "Found process in bundle " + bundleSymbolicName + " with paths: " + pathList); if (engine == null) { throw new IllegalStateException( "Unable to find a ProcessEngine service"); } RepositoryService service = engine.getRepositoryService(); DeploymentBuilder builder = service.createDeployment(); builder.name(bundleSymbolicName); for (URL url : pathList) { InputStream is = url.openStream(); if (is == null) { throw new IOException("Error opening url: " + url); } try { builder.addInputStream(getPath(url), is); } finally { is.close(); } } builder.enableDuplicateFiltering(true); builder.deploy(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to deploy bundle", e); } } ProcessDefinitionDeployerImpl();  ProcessDefinitionDeployerImpl(ProcessEngine engine); @Override void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList); }
ProcessDefinitionDeployerImpl implements ProcessDefinitionDeployer { @Override public void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList) { try { LOGGER.log(Level.FINE, "Found process in bundle " + bundleSymbolicName + " with paths: " + pathList); if (engine == null) { throw new IllegalStateException( "Unable to find a ProcessEngine service"); } RepositoryService service = engine.getRepositoryService(); DeploymentBuilder builder = service.createDeployment(); builder.name(bundleSymbolicName); for (URL url : pathList) { InputStream is = url.openStream(); if (is == null) { throw new IOException("Error opening url: " + url); } try { builder.addInputStream(getPath(url), is); } finally { is.close(); } } builder.enableDuplicateFiltering(true); builder.deploy(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to deploy bundle", e); } } ProcessDefinitionDeployerImpl();  ProcessDefinitionDeployerImpl(ProcessEngine engine); @Override void deployProcessDefinitions(String bundleSymbolicName, List<URL> pathList);  }