public Collection<String> getAlgorithmNames() { try { return deployManager.getAllProcesses(); } catch (Exception e) { e.printStackTrace(); return new ArrayList<String>(); } }
public boolean containsAlgorithm(String processID) { try { return deployManager.containsProcess(processID); } catch (Exception e) { e.printStackTrace(); return false; } }
public boolean addAlgorithm(Object process) { if (!(process instanceof DeployProcessRequest)) { return false; } DeployProcessRequest request = (DeployProcessRequest) process; try { deployManager.deployProcess(request); } catch (Exception e) { LOGGER.warn("Could not instantiate algorithm: " + request); e.printStackTrace(); return false; } return true; }
public Collection<IAlgorithm> getAlgorithms() { Collection<IAlgorithm> result = new ArrayList<IAlgorithm>(); Collection<String> allAlgorithms; try { allAlgorithms = deployManager.getAllProcesses(); } catch (Exception e) { e.printStackTrace(); return new ArrayList<IAlgorithm>(); } for (String processID : allAlgorithms) { result.add(new GenericTransactionalAlgorithm(processID, this.getClass())); } return result; }
public boolean removeAlgorithm(Object process) { if (!(process instanceof UndeployProcessRequest)) { return false; } UndeployProcessRequest request = (UndeployProcessRequest) process; try { deployManager.unDeployProcess(request); } catch (Exception e) { LOGGER.warn("Could not remove algorithm: " + request); e.printStackTrace(); return false; } processDescriptionMap.remove(request.getProcessID()); return true; }